:root {
  --ink: #0a0a0a;
  --ink-soft: #6b6b6b;
  --paper: #ffffff;
  --paper-alt: #f4f4f4;
  --line: #e2e2e2;
  --max: 1240px;

  --display: "Space Grotesk", "Inter", sans-serif;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px 48px;
}

.kicker {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.kicker.light { color: rgba(255, 255, 255, 0.55); }

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 600;
  margin: 0 0 40px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- Navbar ---------- */
.navbar {
  position: static;
  z-index: 100;
  background: #0a0a0a;
}

.nav-inner {
  width: 100%;
  padding: 20px 48px;
  display: grid;
  grid-template-columns: 50% 1fr;
  align-items: center;
}

.nav-logo { grid-column: 1; justify-self: start; }

.nav-right {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.2rem;
  color: #fff;
  transition: opacity 0.15s ease;
}

.nav-links a:hover { opacity: 0.7; }

.nav-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  border: 1px solid #fff;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-contact:hover { background: #fff; color: var(--ink); }

.nav-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  transition: opacity 0.15s ease;
}

.nav-cv:hover { opacity: 0.85; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.2rem;
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 64px;
  padding-bottom: 90px;
  background: var(--ink);
  color: #fff;
}

.hero-inner {
  width: 100%;
  padding: 0 48px;
  flex: 1;
  display: grid;
  grid-template-columns: 50% 1fr;
  align-items: start;
}

.hero-top {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  text-align: left;
}

.hero-tagline {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin: 0;
}

.hero-bottom {
  position: absolute;
  left: 48px;
  bottom: 90px;
}

.hero-role {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 24px;
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3.4rem, 11vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin: 0;
}

.hero-tech-row {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
}

.hero-tech-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.hero-tech-icon:nth-child(3n+2) { border-radius: 50%; }

.hero-tech-icon:nth-child(4n+3) {
  border-radius: 4px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hero-tech-icon.shape-square {
  border-radius: 14px !important;
  clip-path: none !important;
}

.hero-tech-icon.shape-round {
  border-radius: 50% !important;
  clip-path: none !important;
}


.hero-tech-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

.hero-tech-icon i {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.25s ease;
}

.hero-tech-icon:hover,
.hero-tech-icon.active {
  transform: translateY(-3px);
  border-color: var(--icon-color);
  box-shadow: 0 0 22px -4px var(--icon-color);
}

.hero-tech-icon:hover img,
.hero-tech-icon.active img { opacity: 1; }

.hero-tech-icon:hover i,
.hero-tech-icon.active i { color: var(--icon-color); }

.hero-caption {
  margin: 0;
  max-width: 620px;
  align-self: flex-start;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-caption.visible { opacity: 1; }

.hero-caption h3 {
  text-align: left;
}

.hero-caption p {
  text-align: left;
}

.scroll-indicator {
  position: absolute;
  bottom: 48px;
  right: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.scroll-indicator i {
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Work ---------- */
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.work-head .section-title { margin-bottom: 0; }

.view-toggle {
  display: flex;
  border: 1px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.view-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.view-btn.active { background: var(--ink); color: #fff; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.work-grid.list-view { grid-template-columns: 1fr; }

.year-label {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 10px;
}

.work-grid > .year-label:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.work-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.work-card:hover { border-color: var(--ink); background: var(--paper-alt); }

.work-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.work-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

.expand-icon {
  font-size: 0.8rem;
  color: var(--ink-soft);
  transition: transform 0.25s ease;
}

.work-card.open .expand-icon { transform: rotate(45deg); }

.work-card h3 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.work-card h3 span {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 1rem;
}

.work-role {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.work-blurb {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.work-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.work-card.open .work-detail { max-height: 900px; }

.work-detail ul {
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.work-detail li { margin-bottom: 10px; font-size: 0.93rem; }

.work-detail li::marker { color: var(--ink); }

.job-stack {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

/* ---------- About ---------- */
.about { background: #2a2a2a; color: #fff; }

.about .section-title {
  color: #fff;
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  max-width: 900px;
}

.about-lead {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 24px 0 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 48px;
}

.pillar-num {
  display: block;
  font-family: var(--display);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 18px;
  font-weight: 600;
}

.pillar h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.pillar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

/* ---------- Highlights carousel ---------- */
.highlights { background: var(--paper-alt); padding-bottom: 20px; }

.highlights .section-inner { padding-bottom: 0; }

.carousel-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px 100px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1;
}

.carousel-track::-webkit-scrollbar { display: none; }

.quote-card {
  flex: 0 0 min(480px, 82vw);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px;
}

.quote-mark {
  font-size: 1.6rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
  display: block;
}

.quote-card p {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.carousel-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.carousel-btn:hover { background: var(--ink); color: #fff; }

/* ---------- Skills panel ---------- */
.skills-panel {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.skills-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 110px;
}

.skills-tab {
  text-align: left;
  background: none;
  border: none;
  border-left: 2px solid var(--line);
  padding: 12px 0 12px 20px;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.skills-tab:hover { color: var(--ink); }

.skills-tab.active {
  color: var(--ink);
  border-left-color: var(--ink);
  font-weight: 600;
}

.skill-cat {
  display: none;
  flex-direction: column;
  gap: 26px;
}

.skill-cat.active { display: flex; }

.skill-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-pct {
  font-family: var(--display);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.85rem;
}

.skill-track {
  height: 6px;
  border-radius: 999px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Skills (alt: dark, toggle + icon grid) ---------- */
.skills-icons {
  background: #0b1220;
  text-align: center;
}

.skills-switch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

.switch-label {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: color 0.2s ease;
}

.switch-label.active { color: #fff; }

.skills-switch {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.skills-switch[aria-checked="true"] .switch-knob {
  transform: translateX(22px);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 28px;
  justify-items: center;
  max-width: 920px;
  margin: 0 auto 56px;
}

.skill-icon {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.skill-icon:hover { transform: translateY(-3px); }

.skill-icon:nth-child(3n+2) { border-radius: 50%; }

.skill-icon:nth-child(4n+3) {
  border-radius: 4px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.skill-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.skill-icon i {
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s ease;
}

.skill-icon.active {
  border-color: var(--icon-color, #4fd1c5);
  box-shadow: 0 0 26px -4px var(--icon-color, #4fd1c5);
}

.skill-icon.active img { opacity: 1; }

.skill-icon.active i { color: var(--icon-color, #4fd1c5); }

.skill-caption {
  max-width: 620px;
  margin: 0 auto;
  min-height: 90px;
}

.skill-caption h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--icon-color, #4fd1c5);
  transition: color 0.25s ease;
}

.skill-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- Education ---------- */
.edu-row {
  display: flex;
  align-items: baseline;
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.edu-year {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.edu-row h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.edu-row p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(120deg, #131b2c, var(--ink) 55%, #1f2f9e);
  color: #fff;
}

.contact-headline {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 24px;
}

.contact-lead {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 0 44px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
}

.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.contact-value {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 48px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.back-to-top { font-weight: 600; color: var(--ink); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .work-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; gap: 40px; }
  .skills-panel { grid-template-columns: 1fr; gap: 24px; }
  .skills-tabs {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .skills-tab {
    border-left: none;
    border-bottom: 2px solid var(--line);
    padding: 8px 4px;
  }
  .skills-tab.active { border-bottom-color: var(--ink); }

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

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a0a0a;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: none;
    gap: 18px;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: block; }

  .nav-contact { display: none; }

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

  .nav-right { justify-content: flex-end; }

  .section-inner { padding: 70px 24px; }

  .hero-inner {
    padding: 0 24px;
    gap: 48px;
    grid-template-columns: 1fr;
  }

  .hero-top {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }

  .hero-tech-row { justify-content: flex-start; }

  .hero-bottom { left: 24px; bottom: 70px; }

  .scroll-indicator { right: 24px; bottom: 32px; }

  .hero-tech-row { flex-wrap: wrap; margin-top: 36px; }

  .hero-tech-icon { width: 48px; height: 48px; }

  .hero-tech-icon img { width: 20px; height: 20px; }

  .hero-tech-icon i { font-size: 1.1rem; }

  .work-head { flex-direction: column; align-items: flex-start; }

  .carousel-wrap { padding: 0 24px 70px; }

  .quote-card { flex-basis: 88vw; }

  .skill-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .skill-icon { width: 68px; height: 68px; }

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

@media (max-width: 980px) {
  .skill-grid { grid-template-columns: repeat(5, 1fr); }
}
