/* ============ Base ============ */
:root {
  --bg: #0a0e14;
  --surface-1: #0f1420;
  --surface-2: #121a29;
  --surface-3: #101622;
  --surface-4: #0d1320;
  --surface-5: #0b101b;
  --text: #e8ecf4;
  --muted: #9aa6bb;
  --accent: #5eead4;
  --accent-2: #f5b942;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 28px;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; }

a { color: inherit; }

img { max-width: 100%; display: block; }

.accent { color: var(--accent); }

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  z-index: 100;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}
.logo span { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--text); }

.site-nav a.nav-cta {
  color: var(--bg);
  background: var(--accent);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
}
.site-nav a.nav-cta:hover { background: #8df2e2; color: var(--bg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Sliding stacked panels ============ */
.stack { position: relative; }

.panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55);
  padding: calc(var(--header-h) + 2rem) 0 3rem;
  overflow: hidden;
}

.panel-hero       { background: var(--surface-1); border-radius: 0; }
.panel-about      { background: var(--surface-2); }
.panel-experience { background: var(--surface-3); }
.panel-skills     { background: var(--surface-2); }
.panel-projects   { background: var(--surface-4); }
.panel-contact    { background: var(--surface-5); }

.panel-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section-label {
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Hero ============ */
.panel-hero {
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(94, 234, 212, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgba(245, 185, 66, 0.05), transparent),
    var(--surface-1);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  margin: 1.5rem 0 2.2rem;
  max-width: 34em;
}
.lead strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #8df2e2; }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.photo-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  max-width: 380px;
  margin-left: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.photo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid var(--muted);
  border-radius: 14px;
  opacity: 0.6;
}
.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-copy {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.stats {
  list-style: none;
  display: grid;
  gap: 1.4rem;
}
.stats li {
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
}
.stat-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
}
.stat-suffix {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ Experience ============ */
.timeline {
  display: grid;
  gap: 2.2rem;
  margin-top: 1rem;
}

.job {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.job:hover {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.job-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.job-period {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}
.job-place { color: var(--muted); font-size: 0.88rem; }

.job-body h3 { margin-bottom: 0.8rem; }
.job-co { color: var(--accent-2); font-weight: 500; }

.job-body ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.97rem;
}
.job-body li {
  padding-left: 1.2rem;
  position: relative;
}
.job-body li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.job-body strong { color: var(--text); }

/* ============ Skills ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-top: 1rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem;
}
.skill-card-wide { grid-column: 1 / -1; }

.skill-card h3 {
  margin-bottom: 1rem;
  color: var(--accent-2);
  font-size: 1.05rem;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li {
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.18);
  color: var(--text);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* ============ Projects ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-top: 1rem;
}

.project-card {
  display: block;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
a.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.4);
}

.project-tag {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.9rem;
}
.project-card h3 { margin-bottom: 0.7rem; }
.project-card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 1.2rem; }
.project-link {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 1rem;
}

.contact-info p { color: var(--muted); font-size: 1.1rem; }

.contact-links {
  list-style: none;
  margin: 1.6rem 0;
  display: grid;
  gap: 0.7rem;
}
.contact-links a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(94, 234, 212, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

.contact-loc { font-size: 0.92rem !important; }

.contact-form { display: grid; gap: 1.1rem; }

.honey { display: none; }

.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.field input,
.field textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(154, 166, 187, 0.55); }

.btn-submit { justify-self: start; }
.btn-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

.form-status { font-size: 0.92rem; min-height: 1.4em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #f87171; }

.site-footer {
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

/* ============ Mobile ============ */
@media (max-width: 820px) {
  :root { --radius: 20px; --header-h: 64px; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: rgba(10, 14, 20, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 0.35s ease;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { font-size: 1.3rem; }

  .panel { padding: calc(var(--header-h) + 1.5rem) 0 2.5rem; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-photo { order: -1; }
  .photo-frame {
    max-width: 220px;
    margin: 0 auto;
  }
  .scroll-hint { display: none; }

  .about-grid,
  .contact-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid { grid-template-columns: 1fr; }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  .stats li { padding-left: 0.8rem; }

  .job {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1.4rem;
  }
  .job-meta {
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
  }
}
