

:root {
  --black: #030909;
  --deep: #051312;
  --panel: #0A1F1D;
  --panel-2: #0D2624;
  --deep-teal: #023131;
  --teal-dark: #005F60;
  --teal: #008F94;
  --teal-bright: #00B0B5;
  --cyan: #22D6D8;

  --off-white: #F4F7F6;
  --muted: #A8BDBC;
  --muted-dim: #6E8582;

  --border: rgba(244, 247, 246, 0.10);
  --border-strong: rgba(244, 247, 246, 0.18);

  --bg: var(--black);
  --bg-elevated: var(--panel);
  --fg: var(--off-white);
  --fg-muted: var(--muted);
  --line: var(--border);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --nav-height: 76px;
  --container: 1240px;
  --gutter: clamp(24px, 5vw, 64px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- LIGHT MODE (off-white agency variant) ---------- */
html.light {
  --bg: var(--off-white);
  --bg-elevated: #FFFFFF;
  --fg: #04100F;
  --fg-muted: #4B615E;
  --line: rgba(4, 16, 15, 0.09);
  --panel: #FFFFFF;
  --panel-2: #EEF4F3;
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Light/dark uses the real View Transitions API: the browser snapshots
   the old and new page states, and we animate the new snapshot's
   clip-path as a circle growing from the toggle. This line turns off
   the browser's default cross-fade so ONLY that circle reveal plays. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.7s var(--ease), color 0.7s var(--ease);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block;  }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

::selection { background: var(--teal-bright); color: var(--black); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: var(--black);
  padding: 12px 20px;
  z-index: 999;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- LAYOUT HELPERS ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin: 0 0 16px;
}

.section-heading {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---------- ANCHOR SCROLL OFFSET ---------- */
/* Keeps section headings clear of the fixed header when navigating via anchors. */
.section,
#home {
  scroll-margin-top: var(--nav-height);
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   INTRO SPLASH
   ========================================================= */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  will-change: transform;
  transition: transform 0.75s var(--ease), background-color 0.4s var(--ease), visibility 0s linear 0.75s;
}
.intro-splash.is-hidden {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
}

/* Soft radial glow that blooms in behind the wordmark */
.intro-splash::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--teal-bright) 18%, transparent), transparent 62%);
  opacity: 0;
  animation: introGlow 1.6s var(--ease-out) forwards;
  animation-delay: 0.05s;
  pointer-events: none;
}

.intro-splash-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.intro-splash.is-hidden .intro-splash-inner {
  opacity: 0;
  transform: translateY(-18px) scale(0.97);
}

.intro-splash-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(30px, 7vw, 60px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg);
  margin: 0;
  opacity: 0;
}
.intro-splash-word.is-split { opacity: 1; }

.intro-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotate(6deg);
  filter: blur(6px);
  animation: introLetterRise 0.65s var(--ease-out) forwards;
}
.intro-letter.is-space { width: 0.28em; }

@keyframes introLetterRise {
  to { opacity: 1; transform: translateY(0) rotate(0deg); filter: blur(0); }
}

.intro-splash-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  animation: introRise 0.7s var(--ease-out) forwards;
  animation-delay: 0.75s;
}

.intro-splash-bar {
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  opacity: 0;
  animation: introRise 0.6s var(--ease-out) forwards;
  animation-delay: 0.95s;
}
.intro-splash-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  transition: width 1.2s var(--ease-out);
}

@keyframes introRise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introGlow {
  0% { opacity: 0; transform: scale(0.85); }
  60% { opacity: 1; }
  100% { opacity: 0.5; transform: scale(1); }
}

body.intro-active { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .intro-splash,
  .intro-splash-inner,
  .intro-splash-word,
  .intro-letter,
  .intro-splash-label,
  .intro-splash-bar,
  .intro-splash-bar-fill,
  .intro-splash::before {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .intro-splash-bar-fill { width: 100% !important; }
}

/* Header/Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-brand-dot { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 34px);
  margin: 0 auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--fg); }
.nav-links a:hover::after,
.nav-links a.is-active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 0;
  border: none;
  background: none;
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  transition: color 0.25s var(--ease);
}
.theme-toggle:hover { color: var(--cyan); }
.theme-icon { width: 17px; height: 17px; }
/* Icon shows the destination mode: sun while dark (click to go light),
   moon while light (click to go dark). */
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
html.light .theme-icon-sun { display: none; }
html.light .theme-icon-moon { display: block; }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--teal-bright);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 214, 216, 0.35);
}
.nav-cta:active { transform: translateY(0); }

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-burger span {
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* MOBILE MENU  */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 6, 0.6);
  z-index: 550;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu-backdrop.is-open { opacity: 1; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(100%, 420px);
  background: var(--black);
  border-left: 1px solid var(--border-strong);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.4);
  z-index: 600;
  transform: translateX(100%);
  transition: transform 0.42s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 28px clamp(24px, 6vw, 44px) 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.light .mobile-menu {
  background: var(--off-white);
  box-shadow: -24px 0 60px rgba(4, 16, 15, 0.14);
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(40px, 10vh, 80px);
}
.mobile-menu-brand { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.mobile-menu-close {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 20px;
  display: grid; place-items: center;
  color: var(--fg-muted);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-links a {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 500;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  color: var(--fg);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease), background-color 0.25s var(--ease);
}
.mobile-menu-links a:hover,
.mobile-menu-links a:active {
  color: var(--teal-bright);
  padding-left: 12px;
  background: linear-gradient(90deg, rgba(0, 143, 148, 0.08), transparent 70%);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu-cta {
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 16px 24px;
  text-align: center;
  border-radius: 999px;
  background: var(--teal-bright);
  color: var(--black);
}
.mobile-menu-social {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--fg-muted);
}

body.menu-open { overflow: hidden; }

/* HERO */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: var(--black);
}
html.light .hero { background: var(--off-white); }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(0, 176, 181, 0.22) 0%, rgba(0, 95, 96, 0.10) 45%, transparent 70%);
  filter: blur(10px);
}
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--border);
  opacity: 0.5;
}
.hero-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--teal-dark);
  opacity: 0.35;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 60px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 24px;
}

.hero-headline {
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-headline em {
  font-style: normal;
  color: var(--cyan);
  font-weight: 600;
}

.hero-text {
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-bright);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 16px 28px;
  border-radius: 999px;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-primary:hover { background: var(--cyan); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  padding: 16px 4px;
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 14px 26px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-outline:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}

/*  hero visual */
.hero-visual { display: flex; flex-direction: column; gap: 24px; }

.hero-portrait {
  position: relative;
  border: 1px solid var(--border-strong);
  padding: 10px;
  background: linear-gradient(160deg, rgba(0, 143, 148, 0.12), rgba(0, 0, 0, 0));
  box-shadow: 0 0 0 1px rgba(0,0,0,0), 0 40px 80px -30px rgba(0, 176, 181, 0.25);
}
.hero-portrait::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--teal-dark);
  opacity: 0.5;
  pointer-events: none;
}
.hero-portrait-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.hero-meta dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 6px;
}
.hero-meta dd {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg);
}

/*  hero marquee  */
.hero-marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: 20px 0;
}
.hero-marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 32s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-marquee-track { animation: none; }
}
.hero-marquee-track span {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 90px);
}
.about-body p {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.75;
  color: var(--fg-muted);
  margin-bottom: 22px;
}
.about-body p:first-child { color: var(--fg); font-size: clamp(19px, 1.8vw, 23px); }
.about-body p:last-child { margin-bottom: 0; }

.about-info { border-top: 1px solid var(--line); align-self: start; }
.about-info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.about-info-row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.about-info-row dd {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

/* SKILLS */
.skill-rows { border-top: 1px solid var(--line); }
.skill-row {
  display: grid;
  grid-template-columns: 60px 1fr 30px;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 40px) 8px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s var(--ease), padding-left 0.35s var(--ease);
}
.skill-row:hover {
  background: linear-gradient(90deg, rgba(0, 143, 148, 0.08), transparent 70%);
  padding-left: 20px;
}
.skill-row-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-dim);
  transition: color 0.3s var(--ease);
}
.skill-row:hover .skill-row-index { color: var(--cyan); }

.skill-row-main h3 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  margin-bottom: 14px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.skill-tags li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
}
.skill-row-arrow {
  font-size: 18px;
  color: var(--muted-dim);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
  justify-self: end;
}
.skill-row:hover .skill-row-arrow { opacity: 1; transform: translateX(0); color: var(--cyan); }

/* SERVICES*/
.service-rows { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 60px 1fr 30px;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 4vw, 40px) 8px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s var(--ease), padding-left 0.35s var(--ease);
}
.service-row:hover {
  background: linear-gradient(90deg, rgba(0, 143, 148, 0.08), transparent 70%);
  padding-left: 20px;
}
.service-row-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-dim);
  transition: color 0.3s var(--ease);
}
.service-row:hover .service-row-index { color: var(--cyan); }
.service-row-main h3 {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 500;
  margin-bottom: 8px;
}
.service-row-main p {
  font-size: 14px;
  color: var(--fg-muted);
  max-width: 52ch;
  line-height: 1.6;
}
.service-row-arrow {
  font-size: 20px;
  color: var(--muted-dim);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
  justify-self: end;
}
.service-row:hover .service-row-arrow { transform: translate(4px, -4px); color: var(--cyan); }

/*  EDUCATION */
.timeline { border-top: 1px solid var(--line); }
.timeline-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 28px;
  padding: clamp(28px, 4vw, 40px) 8px;
  border-bottom: 1px solid var(--line);
}
.timeline-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 1px solid var(--line);
  padding: 8px;
  background: var(--panel);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 10px;
}
.timeline-content h3 {
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 500;
  margin-bottom: 8px;
}
.timeline-place {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.timeline-desc {
  font-size: 14px;
  color: var(--muted-dim);
  line-height: 1.6;
}

.prof-dev { margin-top: clamp(48px, 6vw, 72px); }
.prof-dev-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 24px;
}
.prof-dev-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.prof-dev-card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.prof-dev-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.prof-dev-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.prof-dev-card p { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }

/* CERTIFICATIONS */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}
.cert-card {
  margin: 0;
  position: relative;
  transition:
    transform 0.4s var(--ease),
    opacity 0.35s var(--ease-out);
}
.cert-card:hover { transform: translateY(-4px); }

/* Cards beyond the visible limit fade out smoothly (opacity/transform).
   JS then sets display:none once the fade finishes, fully removing the
   card from the grid so no leftover row-gap space is left behind —
   this is what previously caused extra blank space below "Show More"
   on narrow (single-column) mobile layouts. */
.cert-card.is-cert-hidden {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}
.cert-thumb-btn {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
}
.cert-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
  filter: grayscale(0.3) brightness(0.85);
}
.cert-thumb-btn:hover img {
  transform: scale(1.06);
  filter: grayscale(0) brightness(1);
}
.cert-thumb-btn::after {
  content: '↗';
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(3, 9, 9, 0.7);
  color: var(--off-white);
  display: grid;
  place-items: center;
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.cert-thumb-btn:hover::after { opacity: 1; transform: translateY(0); }

.cert-card figcaption {
  padding: 14px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cert-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-bright);
}
.cert-card strong { font-size: 14px; font-weight: 500; line-height: 1.35; }
.cert-issuer { font-size: 12px; color: var(--muted-dim); }

.cert-show-more-wrap { display: flex; justify-content: center; margin-top: 48px; }

/*  CERT MODAL */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 6, 0.85);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease);
}.cert-modal.is-open { opacity: 1; visibility: visible; }
.cert-modal-content {
  position: relative;
  max-width: fit-content;
  width: auto;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
}
.cert-modal.is-open .cert-modal-content { transform: translateY(0) scale(1); }
.cert-modal-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  margin: 0 auto;
  object-fit: contain;
  background: var(--black);
}
.cert-modal-caption {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
}
.cert-modal-caption strong { display: block; font-size: 15px; margin-bottom: 4px; }
.cert-modal-caption span { font-size: 13px; color: var(--muted-dim); }
.cert-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-bright);
  color: var(--black);
  display: grid;
  place-items: center;
  font-size: 14px;
}

/* CONTACT */
.contact-section {
  position: relative;
  text-align: center;
  border-bottom: none;
  padding-top: clamp(100px, 14vw, 170px);
  padding-bottom: clamp(100px, 14vw, 170px);
  overflow: hidden;
}
.contact-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 176, 181, 0.22) 0%, transparent 65%);
  pointer-events: none;
}
.contact-section .section-label {
  position: relative;
  display: block;
  text-align: center;
}
.contact-heading {
  position: relative;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 20px 0 28px;
}
.contact-text {
  position: relative;
  max-width: 46ch;
  margin: 0 auto 44px;
  font-size: 17px;
  color: var(--fg-muted);
}
.contact-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}
.copy-feedback {
  position: relative;
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  min-height: 18px;
}
.contact-social {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
}
.contact-social a:hover { color: var(--cyan); }

/*  FOOTER */
.site-footer {
  background: var(--black);
  color: var(--off-white);
}
html.light .site-footer { background: #04100F; color: var(--off-white); }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px var(--gutter) 40px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-brand h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--muted); }
.footer-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.footer-links a { color: var(--muted); transition: color 0.25s var(--ease); }
.footer-links a:hover { color: var(--cyan); }
.footer-divider { height: 1px; background: rgba(244, 247, 246, 0.1); margin-bottom: 24px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copyright { font-size: 12px; color: var(--muted-dim); font-family: var(--font-mono); }

/* RESPONSIVE */
@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; margin: 8px auto 0; }
  .hero-headline { font-size: clamp(38px, 9vw, 54px); }

  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn-ghost { align-self: center; }

  .about-grid { grid-template-columns: 1fr; }
  .about-info { border-top: none; padding-top: 8px; }

  .cert-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }

  .prof-dev-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --nav-height: 68px; }
  .section { padding-left: 20px; padding-right: 20px; }

  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta div:last-child { grid-column: span 2; }

  .skill-row, .service-row {
    grid-template-columns: 40px 1fr;
  }
  .skill-row-arrow, .service-row-arrow { display: none; }

  .timeline-item { grid-template-columns: 1fr; }
  .timeline-logo { margin-bottom: 4px; }

  .contact-actions { flex-direction: column; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  .contact-social { gap: 20px; }

  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .cert-grid { grid-template-columns: 1fr; gap: 28px; }
  .cert-thumb-btn { aspect-ratio: 16 / 10; }
}
