:root {
  --ink: #16181d;
  --ink-soft: #2a2e37;
  --paper: #f7f5f1;
  --gold: #b98a2f;
  --gold-soft: rgba(185, 138, 47, 0.12);
  --muted: #6b7078;
  --line: rgba(22, 24, 29, 0.1);
  --shadow: 0 20px 60px rgba(22, 24, 29, 0.08);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #fff; }

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

a { color: inherit; text-decoration: none; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  background: rgba(247, 245, 241, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}
.logo-dot { color: var(--gold); }
.nav-menu { display: flex; gap: 32px; }
.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s ease;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }
.nav-menu a:hover::after, .nav-menu a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  text-align: center;
}
.hero-glow {
  position: absolute;
  width: 560px; height: 560px;
  top: 15%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 65%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 760px; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-role {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero-desc {
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 30px rgba(22, 24, 29, 0.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(22, 24, 29, 0.3); }
.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-3px); }

.scroll-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  animation: float 2.4s ease-in-out infinite;
  transition: color 0.25s ease;
}
.scroll-hint:hover { color: var(--ink); }
@keyframes float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: #efece5; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 56px;
}
.section-title em { font-style: italic; color: var(--gold); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}
.about-text p { color: var(--muted); font-size: 1.05rem; margin-bottom: 32px; }
.about-facts { list-style: none; display: flex; gap: 40px; }
.about-facts li { display: flex; flex-direction: column; }
.about-facts strong {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--ink);
  line-height: 1.1;
}
.about-facts span, .about-facts li { color: var(--muted); font-size: 0.9rem; }

.about-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-card-head {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
}
.about-card-head .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}
.about-card-head .dot:nth-child(2) { background: #6f7884; }
.about-card-head .dot:nth-child(3) { background: #38404c; }
.about-card-body { padding: 36px 32px 40px; text-align: center; }
.avatar {
  width: 88px; height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e6b45a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
}
.about-card-body h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 4px; }
.about-card-body p { color: rgba(247, 245, 241, 0.6); font-size: 0.9rem; margin-bottom: 24px; }
.about-card-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.about-card-tags span {
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.skill {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.skill:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.skill h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 14px;
}
.skill h3::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 32px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
.skill p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.project {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-visual {
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  color: rgba(255, 255, 255, 0.85);
}
.project-visual span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.4rem;
  line-height: 1;
}
.project-v1 { background: linear-gradient(135deg, #1f242c, #3a4350); }
.project-v2 { background: linear-gradient(135deg, #3a2e18, #6b5422); }
.project-v3 { background: linear-gradient(135deg, #14362e, #23614f); }
.project-body { padding: 28px; }
.project-body h3 { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin-bottom: 10px; }
.project-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.project-tags span {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 600;
}
.project-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}
.project-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.project-link:hover::after { transform: scaleX(1); }

/* ---------- CTA ---------- */
.section-cta { text-align: center; }
.cta-desc {
  max-width: 520px;
  margin: -32px auto 40px;
  color: var(--muted);
  font-size: 1.05rem;
}
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.socials { display: flex; gap: 28px; justify-content: center; }
.socials a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.25s ease;
}
.socials a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
    box-shadow: 0 20px 40px rgba(22, 24, 29, 0.1);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu a { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav-menu a:last-child { border-bottom: 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-facts { gap: 24px; }
  .section { padding: 80px 0; }
}