:root {
  --bg: #080808;
  --bg-2: #101010;
  --bg-3: #151515;
  --bg-4: #1b1b1b;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-1: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.12);
  --blue-glow: rgba(59, 130, 246, 0.22);

  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --nav-h: 72px;
  --max-w: 1180px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

ul {
  list-style: none;
}

button {
  border: 0;
  background: none;
}

main,
footer,
nav {
  position: relative;
  z-index: 1;
}

.mono-text {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

nav.scrolled {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(18px);
  border-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.nav-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-2);
}

.nav-links a::before {
  content: attr(data-num);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--blue-light);
}

.nav-links a:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--text-1);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--blue-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px var(--blue-glow);
}

.hamburger {
  display: none;
  justify-self: end;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.6px;
  border-radius: 999px;
  background: var(--text-1);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(8, 8, 8, 0.98);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 18px 28px 22px;
  transform: translateY(-110%);
  transition: transform 0.32s cubic-bezier(0.77, 0, 0.18, 1);
}

.mobile-menu.open {
  transform: translateY(0);
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mob-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  color: var(--text-2);
}

.mob-link:hover {
  color: var(--text-1);
}

/* SECTIONS */
section {
  padding: 108px 0;
}

#about {
  padding-top: calc(var(--nav-h) + 86px);
  padding-bottom: 0;
}

.section-wrap,
.hero-grid,
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 52px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.section-num {
  font-size: 0.78rem;
  color: var(--blue-light);
  letter-spacing: 0.12em;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.5, 0, 0, 1), transform 0.7s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

/* HERO */
.hero-grid {
  padding-bottom: 82px;
}

.hero-copy {
  max-width: 820px;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 0.78rem;
  color: var(--blue-light);
  letter-spacing: 0.12em;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 7vw, 6.8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  max-width: 100%;
}

.line-wrap {
  display: block;
  overflow: visible;
}

.slide-up {
  display: block;
}

.hero-desc {
  max-width: 620px;
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.16);
}

.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px var(--blue-glow);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-2);
}

.btn-ghost:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-pills span {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
}

/* MARQUEE */
.marquee-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 14px 0;
  background: var(--bg-2);
}

.marquee-track {
  display: flex;
  gap: 22px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 24s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

.marquee-track .dot {
  color: var(--blue-light);
  opacity: 0.6;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* PROJECTS */
.projects-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: grid;
  gap: 28px;
  align-items: stretch;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.2s ease;
}



.project-item:hover {
  transform: translateY(-3px);
}

.project-copy,
.project-visual {
  min-width: 0;
}

.proj-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.proj-num {
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
}

.proj-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.proj-link {
  font-family: var(--font-mono);
  font-size: 0.90rem;
  color: var(--text-3);
}

.proj-link:hover {
  color: var(--text-1);
  transform: translateX(2px);
}

.proj-link-live {
  color: var(--blue-light) !important;
}

.proj-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.proj-header h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.project-item:hover .proj-header h3 {
  color: #fff;
}

.proj-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.proj-desc {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.8;
}

.project-item:hover .proj-desc {
  color: #c2c2c8;
}

.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-stack span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--blue-light);
  background: var(--blue-dim);
  border: 1px solid rgba(59, 130, 246, 0.16);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.project-item:hover .proj-stack span:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.18);
}

.project-visual {
  display: flex;
  align-items: stretch;
}

.visual-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.014));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.visual-card-alt {
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(255,255,255,0.014));
}

.visual-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: end;
  min-height: 140px;
}

.visual-bars div {
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, rgba(59,130,246,0.9), rgba(59,130,246,0.2));
  min-height: 48px;
}

.visual-bars div:nth-child(1) { height: 54%; }
.visual-bars div:nth-child(2) { height: 78%; }
.visual-bars div:nth-child(3) { height: 40%; }
.visual-bars div:nth-child(4) { height: 90%; }
.visual-bars div:nth-child(5) { height: 62%; }

.visual-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-stat,
.metric-grid > div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.mini-stat strong,
.metric-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.mini-stat span,
.metric-grid span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-2);
  line-height: 1.5;
}

.flow-stack {
  display: grid;
  gap: 10px;
}

.flow-stack div {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  color: var(--text-1);
  font-size: 0.92rem;
}

.chart-placeholder {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
  min-height: 150px;
}

.chart-placeholder span {
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, rgba(245,158,11,0.9), rgba(245,158,11,0.2));
}

.chart-placeholder span:nth-child(1) { height: 30%; }
.chart-placeholder span:nth-child(2) { height: 68%; }
.chart-placeholder span:nth-child(3) { height: 46%; }
.chart-placeholder span:nth-child(4) { height: 84%; }
.chart-placeholder span:nth-child(5) { height: 55%; }
.chart-placeholder span:nth-child(6) { height: 72%; }

.visual-note {
  font-size: 0.82rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.skill-group {
  padding: 30px;
  background: var(--bg);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.skill-group:hover {
  background: var(--bg-2);
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.08);
}

.sg-label {
  margin-bottom: 16px;
  font-size: 0.72rem;
  color: var(--blue-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sg-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sg-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 0.92rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.skill-group:hover .sg-tags span {
  color: var(--text-1);
  border-color: var(--border-hover);
}

.skill-group:hover .sg-tags span:hover {
  transform: translateY(-2px);
  background: var(--blue-dim);
  border-color: rgba(59,130,246,0.34);
}

/* JOURNEY */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
  align-items: start;
}

.journey-label {
  margin-bottom: 18px;
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-card,
.edu-card {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-2);
  padding: 24px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.timeline-card:hover,
.edu-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--bg-3);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.timeline-head h3,
.edu-card h3 {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
}

.timeline-head p,
.edu-card p {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--text-2);
}

.timeline-head span {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-light);
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.18);
  padding: 4px 8px;
  border-radius: 999px;
}

.timeline-card ul {
  padding-left: 0;
}

.timeline-card li {
  position: relative;
  padding: 5px 0 5px 16px;
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.65;
}

.timeline-card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--blue-light);
}

.edu-year {
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: var(--blue-light);
  letter-spacing: 0.08em;
}

.edu-card span {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
}

/* CONTACT */
#contact {
  padding-bottom: 82px;
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 34px;
  padding: 52px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
}

.contact-copy h2 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.contact-copy p {
  max-width: 460px;
  margin-top: 16px;
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.8;
}

.contact-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.95rem;
}

.contact-link:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  transform: translateX(3px);
}

.cl-icon {
  width: 28px;
  flex-shrink: 0;
  text-align: center;
  color: var(--blue-light);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.availability-card {
  margin-top: 10px;
  padding: 22px;
  border-radius: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.availability-label {
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.availability-title {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.availability-text {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* FOOTER */
footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

footer .mono-text {
  font-size: 0.78rem;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-3);
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--text-1);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .project-item,
  .project-item.reverse {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-grid {
    grid-template-columns: 1fr;
  }

  .contact-shell {
    grid-template-columns: 1fr;
    padding: 42px;
  }
}

@media (max-width: 960px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-inner {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  section {
    padding: 92px 0;
  }

  .section-wrap,
  .hero-grid,
  .footer-inner,
  .nav-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  #about {
    padding-top: calc(var(--nav-h) + 70px);
  }

  .hero-grid {
    padding-bottom: 62px;
  }

  .hero-name {
    font-size: clamp(2.1rem, 12vw, 0.75rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .line-wrap {
    overflow: visible;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-item {
    padding: 28px 0;
  }

  .proj-meta {
    align-items: center;
  }

  .contact-shell {
    padding: 28px 18px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .mobile-menu {
    padding: 18px 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}