:root {
  --bg: #0f1115;
  --bg-2: #161922;
  --line: #262b38;
  --text: #e7e9ee;
  --muted: #9aa1b2;
  --accent: #6ee7b7;
  --accent-ink: #0b1a14;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafaf7;
    --bg-2: #ffffff;
    --line: #e4e4dd;
    --text: #15171c;
    --muted: #5d6475;
    --accent: #0f9d6e;
    --accent-ink: #ffffff;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, calc((100% - 1080px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; letter-spacing: .5px; font-size: 1.15rem; }
.logo span { color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: .95rem; color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 1.1rem; padding: 4px 11px; border-radius: 8px; cursor: pointer; }

/* BUTTONS */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .95rem;
  border: 1px solid var(--accent); transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); opacity: .92; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { padding: 7px 16px; font-size: .88rem; color: var(--accent-ink); }
.nav nav .btn.small:hover { color: var(--accent-ink); }

/* HERO */
.hero {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center;
  padding: 80px 0 60px; min-height: calc(100vh - 60px);
}
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: .95rem; margin-bottom: 8px; }
h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.role { margin-top: 12px; font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--muted); font-weight: 500; }
.role .dot { color: var(--accent); margin: 0 4px; }
.lead { margin-top: 22px; color: var(--muted); font-size: 1.08rem; max-width: 56ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.status { margin-top: 32px; font-family: var(--mono); font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-photo { display: flex; justify-content: center; }
.photo-frame {
  position: relative; width: min(100%, 340px); aspect-ratio: 3/4;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 18px 18px 0 -2px color-mix(in srgb, var(--accent) 22%, transparent);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* SECTIONS */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.02em; margin-bottom: 36px; }
h2 .num { font-family: var(--mono); font-size: .9rem; color: var(--accent); margin-right: 12px; vertical-align: middle; font-weight: 500; }
h3 { font-size: 1.15rem; line-height: 1.35; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; color: var(--muted); font-size: 1.04rem; }
.about-grid strong { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.stats li { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stats strong { display: block; font-size: 2rem; color: var(--accent); line-height: 1.1; }
.stats span { color: var(--muted); font-size: .88rem; }

/* EXPERIENCE */
.timeline { display: grid; gap: 22px; }
.job { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.job-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.company { color: var(--accent); font-weight: 500; font-size: .98rem; }
.when { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding-top: 4px; }
.job > ul { display: grid; gap: 8px; color: var(--muted); }
.job > ul li { position: relative; padding-left: 20px; }
.job > ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.job b { color: var(--text); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags span {
  font-family: var(--mono); font-size: .74rem; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}

.client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 22px; }
.client { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--bg); }
.client h4 { font-size: 1rem; margin-bottom: 6px; }
.client p { color: var(--muted); font-size: .92rem; }
.client .tags { margin-top: 12px; }

/* PROJECTS */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card p { color: var(--muted); margin-top: 10px; font-size: .95rem; }
.card .tags { margin-top: auto; padding-top: 18px; }

/* SKILLS */
.skills { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.skills > div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.skills > div:last-child { border-bottom: 0; }
.skills dt { font-weight: 600; }
.skills dd { color: var(--muted); }

/* EDU */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.sub { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 0 0 14px; font-weight: 500; }
.two-col > div > .sub:not(:first-child) { margin-top: 36px; }
.edu { display: grid; margin-bottom: 14px; }
.edu span { color: var(--muted); font-size: .94rem; }
.plain { display: grid; gap: 8px; color: var(--muted); font-size: .96rem; }
.plain li { padding-left: 18px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* CONTACT */
.contact { text-align: center; padding-bottom: 110px; }
.contact .lead { margin-inline: auto; }
.contact .cta { justify-content: center; }

footer { border-top: 1px solid var(--line); padding: 26px 20px; text-align: center; color: var(--muted); font-size: .88rem; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 10px 0; width: 100%; }
  .nav nav .btn.small { width: auto; margin-top: 8px; }

  .hero { grid-template-columns: 1fr; padding-top: 40px; min-height: 0; gap: 40px; }
  .hero-photo { order: -1; justify-content: flex-start; }
  .photo-frame { width: 220px; }
  .about-grid, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills > div { grid-template-columns: 1fr; gap: 2px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .job { padding: 22px; }
}
