:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-shadow: #0a0a0ad0;
  --bg-shadow2: #000000f0;
  --text: #fafafa;
  --text-muted: #888888;
  --accent: #f4a261;
  --border: #222222;
  --radius: 0px;
  --radius2: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.unselectable {
  user-drag: none; 
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

html {
  scroll-behavior: smooth;
}

body {
  /*font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;*/
  font-family: 'Space Mono', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Canvas */
#glcanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* UI Layer - Hero Section */
.ui-layer {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-weight: 500;
}

nav a:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.2s ease;
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 0;
}

a {
  font-weight: 800;
  color: var(--accent);
}

a.ref:hover {
  color: var(--accent2);
}

.hero-content {
  max-width: 720px;
  background-color: var(--bg-shadow);
  padding: 2rem;
}

.hero-label {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent2-transparent);
  border-radius: var(--radius2);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  padding-left: 1rem;
  border-left: 1px solid var(--accent);
}

.hero-cta {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-shadow);
  padding: 1rem 2rem;
  width: 48px;
}

.scroll-indicator span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
  align-items: center;
}

.scroll-line {
  width: 12px;
  height: 12px;
  border-right: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  transform: rotate(45deg);
  background: transparent;
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.content {
  position: relative;
  z-index: 2;
  background: var(--bg);
  border-top: 1px solid var(--border);

}

.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-number {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--accent);
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.experience-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s ease;
}

.experience-card:hover {
  border-color: var(--text-muted);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.card-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-company {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.card-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.card-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-tags span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-4px);
}

.project-card.featured {
  border-color: var(--accent);
  background: rgba(204, 255, 0, 0.02);
}

.project-icon {
  display: block;
  margin-bottom: 0.7rem;
}

.project-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-category h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-list span {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.skill-list span:hover {
  border-color: var(--accent);
}

.section-contact {
  text-align: center;
  padding: 8rem 2rem;
}

.contact-content {
  max-width: 480px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-education {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 768px) {
  /* 1. Reset the nav for animation */
  nav {
    display: flex; /* Keep it flex so we don't toggle display */
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0%;
    width: 40%;
    background: var(--bg-elevated); /* Slightly lighter background */
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    align-items: center;
    gap: 1.5rem;
    z-index: 99;
    
    /* Animation state: Hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  /* 2. Active state: Visible */
  nav.active {
    opacity: 1;
    visibility: visible;
    width: 40%;
    right: 0%;
  }

  /* 3. The Button Container */
  .menu-toggle {
    display: block;
    position: relative;
    width: 44px;  /* Fixed touch target size */
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 100;
  }

  /* 4. The Hamburger Lines (Shared Styles) */
  .menu-toggle span {
    position: absolute;
    left: 50%;
    width: 24px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    /* Center the pivot point */
    transform-origin: center; 
    transform: translateX(-50%);
  }

  /* 5. Line Positions (Closed State) */
  /* Top line sits slightly above center */
  .menu-toggle span:first-child {
    top: 35%;
  }
  
  /* Bottom line sits slightly below center */
  .menu-toggle span:last-child {
    top: 65%;
  }

  /* 6. Line Positions (Open/Active State) */
  /* Both lines move to absolute center and rotate */
  .menu-toggle.active span:first-child {
    top: 50%;
    transform: translateX(-50%) rotate(45deg);
  }

  .menu-toggle.active span:last-child {
    top: 50%;
    transform: translateX(-50%) rotate(-45deg);
  }

  .skills-grid {
    gap: 1.5rem; /* Tighten gap for small screens */
    grid-template-columns: 1fr; /* Force single column on very small phones */
  }
  
  .skill-list {
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .skill-list span {
    font-size: 0.8rem; /* Slightly smaller text for tiny screens */
    padding: 0.4rem 0.8rem;
  }

  .projects-grid {
    grid-template-columns: 1fr; /* This forces them to stack */
    gap: 1rem; /* Optional: reduce gap slightly for mobile */
  }
}

.resize-animation-stopper * {
  animation: none !important;
  transition: none !important;
}


@media (max-width: 480px) {
  /* Prevent text overflow */
  h1 {
    word-wrap: break-word;
    hyphens: auto;
  }

  /* Fix the email and other long strings */
  .contact-email, .hero-description {
    word-break: break-word;
  }

  /* Ensure no element can ever be wider than the screen */
  body, html {
    overflow-x: hidden;
    position: relative;
    width: 100%;
  }

}