/* ===== Tokens ===== */
:root {
  --bg: #0a0b0e;
  --bg-alt: #0e1014;
  --surface: #14171c;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eaed;
  --muted: #9097a3;
  --accent: #7cc4ff;
  --accent-soft: rgba(124, 196, 255, 0.12);
  --radius: 14px;
  --max: 1080px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.container { width: min(var(--max), 100% - 48px); margin-inline: auto; }

/* ===== Nav ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(24px, calc((100% - var(--max)) / 2));
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 14, 0.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__logo { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 0.92rem; font-weight: 400; }
.nav__links a { color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px;
}
.nav__cta:hover { border-color: var(--accent); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform 0.25s; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, transparent 0%, var(--bg) 75%);
}
.hero__glow {
  position: absolute; width: 560px; height: 560px; right: -120px; top: 12%;
  background: radial-gradient(circle, rgba(124, 196, 255, 0.18), transparent 65%);
  filter: blur(40px); z-index: 1;
}
.hero__inner { position: relative; z-index: 2; padding-top: 60px; }
.eyebrow { color: var(--accent); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 22px; }
.hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 700; margin-bottom: 26px; }
.hero__lead { max-width: 520px; font-size: 1.2rem; color: var(--muted); margin-bottom: 38px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; z-index: 2; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1.5px solid var(--line); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--accent); border-radius: 2px; animation: scroll 1.8s infinite;
}
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 500; transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }

/* ===== Sections ===== */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__label { color: var(--accent); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 14px; }
.section h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 600; }
.section__head { margin-bottom: 64px; }

/* ===== Placeholder / image frames ===== */
.ph {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), #0f1217);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 0.85rem;
}
.ph small { opacity: 0.6; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ph--wide { aspect-ratio: 16 / 10; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; }
.about__text p { color: #c6cad1; }
.about__text h2 { margin-bottom: 24px; }
.facts { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; padding: 0; margin: 32px 0; }
.facts li { flex: 1 1 140px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts strong { display: block; font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; }
.facts span { font-size: 0.8rem; color: var(--muted); }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.skills h3 { font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-family: var(--font-body); font-weight: 500; margin-bottom: 6px; }
.skills p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ===== Projects ===== */
.project { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; margin-bottom: 96px; }
.project:last-child { margin-bottom: 0; }
/* Layout alternates automatically: every 2nd project puts the photo on the right */
.projects .project:nth-child(even) .project__media { order: 2; }
.project__tag { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; margin-bottom: 10px; }
.project h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; margin-bottom: 16px; }
.project p { color: #c6cad1; }
.bullets { padding-left: 18px; margin: 0 0 22px; color: var(--muted); font-size: 0.95rem; }
.bullets li { margin-bottom: 6px; }
.bullets li::marker { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 0.78rem; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 400; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 0; }
.tl { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 32px 0; border-top: 1px solid var(--line); }
.tl:last-child { border-bottom: 1px solid var(--line); }
.tl__date { color: var(--muted); font-size: 0.9rem; padding-top: 4px; }
.tl h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 4px; }
.tl__role { color: var(--accent); font-size: 0.92rem; margin-bottom: 12px; }
.tl p:last-child { color: #c6cad1; margin: 0; font-size: 0.97rem; }

/* ===== Hobbies ===== */
.hobbies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 56px; }
.hobby { display: flex; flex-direction: column; padding: 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform 0.25s, border-color 0.25s; }
.hobby:hover { transform: translateY(-4px); border-color: rgba(124, 196, 255, 0.4); }
.hobby__num { font-family: var(--font-head); color: var(--accent); font-size: 0.85rem; }
.hobby h3 { font-size: 1.3rem; margin: 12px 0 10px; font-weight: 600; }
.hobby p { color: var(--muted); font-size: 0.92rem; margin: 0 0 22px; }
.hobby .ph { margin-top: auto; aspect-ratio: 4 / 5; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery .ph { aspect-ratio: 1 / 1; }

/* ===== Contact ===== */
.contact { text-align: center; }
.contact__inner { max-width: 620px; }
.contact__lead { color: var(--muted); margin: 20px 0 36px; font-size: 1.05rem; }
.contact__links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 0.88rem; }
.footer .container { display: flex; justify-content: space-between; align-items: center; }
.footer p { margin: 0; }
.footer a:hover { color: var(--text); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about, .project { grid-template-columns: 1fr; gap: 36px; }
  .projects .project:nth-child(even) .project__media { order: 0; }
  .about__photo { max-width: 340px; }
  .hobbies { grid-template-columns: 1fr 1fr; }
  .tl { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 720px) {
  .section { padding: 84px 0; }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    gap: 0; padding: 8px 24px 20px; background: rgba(10, 11, 14, 0.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 0; width: 100%; }
  .nav__cta { border: 0; padding: 12px 0; border-radius: 0; }
  .skills { grid-template-columns: 1fr; }
  .hobbies { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
}
