/* ─── VARIABLES ──────────────────────────────────────────── */
:root {
  --bg-primary:    #06060d;
  --bg-secondary:  #0c0c18;
  --bg-alt:        #090912;
  --bg-card:       #0f0f1e;
  --bg-card-hover: #131328;

  --border:        #1a1a30;
  --border-mid:    #272744;
  --border-light:  #363660;

  --accent:        #a78bfa;
  --accent-dim:    rgba(167, 139, 250, 0.08);
  --accent-glow:   rgba(167, 139, 250, 0.18);
  --accent-warm:   #3de6c0;
  --accent-warm-dim: rgba(61, 230, 192, 0.08);

  --text-primary:  #eaeaf5;
  --text-secondary:#b0b0d4;
  --text-muted:    #6060a0;

  --font-display:  'Syne', sans-serif;
  --font-mono:     'Space Mono', monospace;
  --font-body:     'DM Sans', sans-serif;

  --radius:        6px;
  --radius-lg:     14px;
  --nav-h:         72px;
  --max-w:         1160px;
  --pad-section:   120px;
}

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { color: var(--text-primary); font-weight: 500; }

/* ─── UTILITY ────────────────────────────────────────────── */
.mono        { font-family: var(--font-mono); }
.accent      { color: var(--accent); }
.accent-text { color: var(--accent); font-weight: 500; }
.container   { max-width: var(--max-w); margin: 0 auto; padding: 0 36px; }

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 200;
  transition: background 0.4s, border-bottom 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  cursor: pointer;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  color: var(--accent) !important;
  border: 1px solid rgba(167, 139, 250, 0.35);
  padding: 7px 20px !important;
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s !important;
}
.nav__cta::after { display: none !important; }
.nav__cta:hover {
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 64px) 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero__bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
}
.hero__bg-glow--teal {
  width: 700px; height: 700px;
  top: -15%; right: -8%;
  background: radial-gradient(circle, rgba(167,139,250,0.09) 0%, transparent 65%);
}
.hero__bg-glow--amber {
  width: 500px; height: 500px;
  bottom: 5%; left: -5%;
  background: radial-gradient(circle, rgba(251,191,36,0.05) 0%, transparent 65%);
}
.hero__grid {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: center;
}
.hero__label {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero__label::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
}
.hero__name {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(4rem, 8vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  background: linear-gradient(145deg, var(--text-primary) 50%, rgba(167,139,250,0.55));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 52px;
  line-height: 1.85;
}
.hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 52px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  width: fit-content;
}
.stat { text-align: center; padding: 0 28px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat__top { display: flex; align-items: baseline; gap: 2px; justify-content: center; }
.stat__number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-warm);
  line-height: 1;
}
.stat__unit {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-warm);
  opacity: 0.7;
}
.stat__label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat__divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: all 0.22s;
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn--primary:hover {
  background: #52eecb;
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(61, 230, 192, 0.28);
}
.btn--ghost {
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── HERO IMAGE ─────────────────────────────────────────── */
.hero__image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.hero__image-frame {
  position: relative;
  width: 300px;
  height: 360px;
}
.hero__image-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(160deg, rgba(167,139,250,0.55) 0%, rgba(167,139,250,0.08) 45%, rgba(251,191,36,0.35) 100%);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.hero__image-frame::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--bg-secondary);
  border-radius: calc(var(--radius-lg) - 1px);
  z-index: 1;
}
.hero__image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 1px);
  filter: saturate(0.9);
  transition: filter 0.4s;
}
.hero__image-frame:hover .hero__image { filter: saturate(1.05); }
.hero__image-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.hero__image-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.hero__scroll-indicator:hover { color: var(--text-secondary); }
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ─── SECTIONS ───────────────────────────────────────────── */
.section { padding: var(--pad-section) 0; }
.section--alt { background: var(--bg-alt); }
.section__header { margin-bottom: 64px; }
.section__tag {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ─── ABOUT ──────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about__text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1.02rem;
  line-height: 1.85;
}
.about__text strong { color: var(--text-primary); }
.detail-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.detail-item:first-child { border-top: 1px solid var(--border); }
.detail-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.detail-value { font-size: 0.9rem; color: var(--text-secondary); }
.link { transition: color 0.2s; }
.link:hover { color: var(--accent); }

/* ─── TIMELINE ───────────────────────────────────────────── */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 168px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 30%, var(--border));
}
.timeline__item {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 48px;
  padding-bottom: 56px;
  position: relative;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::after {
  content: '';
  position: absolute;
  left: 162px; top: 9px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border-mid);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.timeline__item:hover::after {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.timeline__meta {
  padding-top: 2px;
  text-align: right;
  padding-right: 24px;
}
.timeline__date {
  font-size: 0.66rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.timeline__badge {
  display: inline-block;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  padding: 3px 9px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(61,230,192,0.2);
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.timeline__role {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.timeline__company {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}
.timeline__bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.timeline__bullets li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}
.timeline__bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.timeline__tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* ─── TAGS ───────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--border-mid); color: var(--text-primary); }
.tag--accent {
  background: var(--accent-dim);
  border-color: rgba(61,230,192,0.18);
  color: var(--accent);
}

/* ─── SKILLS ─────────────────────────────────────────────── */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 72px;
}
.skill-group__title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.skill-group__tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── PROJECTS ───────────────────────────────────────────── */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent-warm), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-5px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.project-card:hover::before { opacity: 1; }
.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
}
.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.project-card__date {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.project-card__type {
  font-size: 0.68rem;
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.project-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.3;
}
.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.75;
}
.project-card__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.project-card__link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 18px;
  letter-spacing: 0.02em;
  transition: letter-spacing 0.25s, opacity 0.2s;
}
.project-card__link:hover { letter-spacing: 0.06em; opacity: 0.8; }

/* ─── CREDENTIALS ────────────────────────────────────────── */
.creds__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cred-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 28px 0;
  display: flex;
  gap: 0;
  align-items: stretch;
  transition: border-color 0.2s, transform 0.2s;
  overflow: hidden;
}
.cred-card:hover {
  border-color: var(--border-mid);
  transform: translateX(4px);
}
.cred-card__accent {
  width: 3px;
  min-height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-warm));
  border-radius: 0 2px 2px 0;
  flex-shrink: 0;
  margin-right: 24px;
}
.cred-card__body { flex: 1; }
.cred-card__category {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}
.cred-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.cred-card__issuer {
  font-size: 0.8rem;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.cred-card__note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── WRITING ────────────────────────────────────────────── */
.writing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.writing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s, transform 0.3s;
}
.writing-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-4px);
}
.writing-card__type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
}
.writing-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.writing-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
  flex: 1;
}
.writing-card__link {
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 4px;
  letter-spacing: 0.02em;
  transition: letter-spacing 0.25s;
}
.writing-card__link:hover { letter-spacing: 0.06em; }

/* ─── CONTACT ────────────────────────────────────────────── */
.contact__layout { max-width: 680px; }
.contact__intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.85;
}
.contact__links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.contact-link:hover {
  border-color: var(--accent);
  transform: translateX(8px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.contact-link__icon {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(61,230,192,0.15);
  border-radius: var(--radius);
  color: var(--accent);
  flex-shrink: 0;
}
.contact-link__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.contact-link__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.contact-link__value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.contact-link:hover .contact-link__value { color: var(--text-primary); }
.contact-link__arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: color 0.2s, transform 0.2s;
}
.contact-link:hover .contact-link__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.footer__copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.footer__socials {
  display: flex;
  gap: 16px;
}
.footer__socials a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s;
}
.footer__socials a:hover {
  color: var(--accent);
  border-color: rgba(61,230,192,0.3);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__image-wrap { display: none; }
  .timeline { padding-left: 0; }
  .timeline::before { left: 0; }
  .timeline__item { grid-template-columns: 1fr; gap: 12px; padding-left: 24px; }
  .timeline__item::after { left: -7px; }
  .timeline__meta { text-align: left; padding-right: 0; display: flex; gap: 14px; align-items: center; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .skills__grid { gap: 36px 48px; }
  .projects__grid { grid-template-columns: 1fr; }
  .project-card--featured { grid-column: auto; }
  .creds__grid { grid-template-columns: 1fr; }
  .writing__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --pad-section: 80px; }
  .nav { padding: 0 24px; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    top: var(--nav-h);
    background: var(--bg-primary);
    justify-content: center;
    align-items: center;
    gap: 36px;
    z-index: 199;
  }
  .nav__links.open a { font-size: 1.4rem; color: var(--text-primary); }
  .nav__toggle { display: flex; }
  .hero { padding: calc(var(--nav-h) + 40px) 24px 64px; }
  .hero__stats { flex-direction: column; width: 100%; padding: 24px; }
  .stat__divider { width: 100%; height: 1px; }
  .stat { padding: 0; }
  .container { padding: 0 24px; }
  .skills__grid { grid-template-columns: 1fr; }
}
