/* ─── RESET & ROOT ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #0f0f0f;
  --ink-soft:   #444;
  --ink-muted:  #888;
  --paper:      #f7f5f0;
  --paper-warm: #edeae3;
  --dark:       #111210;
  --dark-2:     #1a1c19;
  --accent:     #c8a96e;
  --accent-dim: rgba(200,169,110,0.15);
  --rule:       rgba(0,0,0,0.08);
  --rule-dark:  rgba(255,255,255,0.08);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.email-link, .phone-link { text-decoration: underline; cursor: pointer; }
ul { list-style: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: 1rem; padding: 2rem;
}
.empty-state__icon { font-size: 3rem; color: var(--accent); }
.empty-state h1 { font-family: var(--font-display); font-size: 2rem; }
.empty-state p { color: var(--ink-soft); }
.empty-state a { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* ─── NAV ────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(247,245,240,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: padding 0.3s var(--ease);
}
.nav--scrolled { padding: 0.85rem 3rem; }
.nav__logo {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; letter-spacing: 0.05em;
}
.nav__links { display: flex; align-items: center; gap: 2.5rem; }
.nav__links a {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); transition: color 0.2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--ink) !important;
  color: var(--ink) !important; border-radius: 2px;
  transition: background 0.2s, color 0.2s !important;
}
.nav__cta:hover { background: var(--ink) !important; color: var(--paper) !important; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav__burger span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: 0.3s; }

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 3rem 5rem; max-width: 1200px; margin: 0 auto; position: relative;
}
.hero::after {
  content: ''; position: absolute; right: -100px; top: 20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(200,169,110,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero__label {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}
.hero__name {
  font-family: var(--font-display); font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; margin-bottom: 2.5rem;
}
.hero__first { display: block; }
.hero__last  { display: block; color: var(--ink-muted); }
.hero__summary {
  font-size: 1.05rem; font-weight: 300; line-height: 1.75;
  color: var(--ink-soft); max-width: 620px; margin-bottom: 2rem;
}
.hero__meta {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.82rem; color: var(--ink-muted); flex-wrap: wrap;
}
.hero__meta a { border-bottom: 1px solid var(--accent); padding-bottom: 1px; transition: color 0.2s; }
.hero__meta a:hover { color: var(--ink); }
.sep { opacity: 0.4; }
.hero__scroll {
  display: flex; align-items: center; gap: 1rem; margin-top: 4rem;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted);
}
.hero__scroll-line {
  width: 60px; height: 1px; background: var(--accent);
  transform-origin: left;
  animation: lineGrow 1.5s var(--ease-out) 1s both;
}
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ─── SECTIONS ───────────────────────────────────────────────── */
.section { padding: 7rem 3rem; max-width: 1200px; margin: 0 auto; }
.section--dark {
  background: var(--dark); color: var(--paper);
  max-width: 100%; padding: 7rem 0;
}
.section--dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 3rem; padding-right: 3rem; }
.section--dark .section__header { padding-left: 3rem; padding-right: 3rem; max-width: 1200px; margin: 0 auto 4rem; }
.section--dark .section__number { color: rgba(200,169,110,0.4); }
.section--dark .section__title  { color: var(--paper); }
.section__header {
  display: flex; align-items: baseline; gap: 1.5rem;
  margin-bottom: 4rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule);
}
.section--dark .section__header { border-bottom-color: var(--rule-dark); }
.section__number { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; }
.section__title  { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.02em; }

/* ─── TIMELINE ───────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline__item {
  display: grid; grid-template-columns: 180px 1fr; gap: 2rem;
  padding: 2.5rem 0; border-bottom: 1px solid var(--rule);
}
.timeline__item:first-child { border-top: 1px solid var(--rule); }
.timeline__date { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-muted); white-space: nowrap; padding-top: 0.2rem; }
.timeline__role { font-size: 1rem; font-weight: 500; margin-bottom: 0.25rem; }
.timeline__company { font-family: var(--font-display); font-size: 1.1rem; color: var(--accent); margin-bottom: 1rem; font-style: italic; }
.timeline__bullets li {
  font-size: 0.88rem; color: var(--ink-soft); line-height: 1.65;
  padding: 0.2rem 0 0.2rem 1rem; position: relative;
}
.timeline__bullets li::before { content: '—'; position: absolute; left: 0; color: var(--accent); font-size: 0.7rem; top: 0.3rem; }

/* ─── PROJECTS ───────────────────────────────────────────────── */
.projects__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5px; background: var(--rule-dark); border: 1px solid var(--rule-dark);
  max-width: 1200px; margin: 0 auto; padding: 0 3rem;
}
.project-card { background: var(--dark-2); padding: 2.5rem; transition: background 0.3s var(--ease); }
.project-card:hover { background: #1e2020; }
.project-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.project-card__name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--paper); margin-bottom: 0.25rem; }
.project-card__url a { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); letter-spacing: 0.05em; transition: opacity 0.2s; }
.project-card__url a:hover { opacity: 0.7; }
.project-card__tools { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); background: rgba(255,255,255,0.05); padding: 0.3rem 0.7rem; border-radius: 2px; white-space: nowrap; }
.project-card__desc { font-size: 0.88rem; color: rgba(247,245,240,0.55); line-height: 1.65; margin-bottom: 1.25rem; }
.project-card__features { margin-bottom: 1.5rem; }
.project-card__features li { font-size: 0.82rem; color: rgba(247,245,240,0.7); line-height: 1.6; padding: 0.2rem 0 0.2rem 1rem; position: relative; }
.project-card__features li::before { content: '·'; position: absolute; left: 0; color: var(--accent); }
.project-card__stack { display: flex; flex-wrap: wrap; gap: 0.4rem; border-top: 1px solid var(--rule-dark); padding-top: 1.25rem; }
.project-card__stack span { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-dim); padding: 0.25rem 0.6rem; border-radius: 2px; }

/* ─── SKILLS ─────────────────────────────────────────────────── */
.skills__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; margin-bottom: 5rem; }
.skills__group-title { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
.skills__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skills__tags span { font-size: 0.82rem; color: var(--ink-soft); background: var(--paper-warm); border: 1px solid var(--rule); padding: 0.35rem 0.8rem; border-radius: 2px; transition: border-color 0.2s, color 0.2s; }
.skills__tags span:hover { border-color: var(--accent); color: var(--ink); }
.credentials { border-top: 1px solid var(--rule); padding-top: 3rem; }
.credentials__title { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.5rem; }
.credential { display: flex; justify-content: space-between; align-items: baseline; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); gap: 1rem; flex-wrap: wrap; }
.credential__name { font-size: 0.9rem; font-weight: 500; }
.credential__org { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-muted); }

/* ─── CONTACT ────────────────────────────────────────────────── */
.contact__layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6rem; max-width: 1200px; margin: 0 auto; padding: 0 3rem; }
.contact__intro { font-size: 1rem; font-weight: 300; line-height: 1.75; color: rgba(247,245,240,0.65); margin-bottom: 2.5rem; }
.contact__links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact__link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 0.05em; transition: opacity 0.2s; }
.contact__link:hover { opacity: 0.7; }
.contact__form { display: flex; flex-direction: column; gap: 1.25rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form__field { display: flex; flex-direction: column; gap: 0.5rem; }
.form__field label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247,245,240,0.4); }
.form__field input, .form__field textarea { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 2px; padding: 0.85rem 1rem; color: var(--paper); font-family: var(--font-body); font-size: 0.88rem; outline: none; transition: border-color 0.2s; resize: vertical; }
.form__field input::placeholder, .form__field textarea::placeholder { color: rgba(247,245,240,0.25); }
.form__field input:focus, .form__field textarea:focus { border-color: var(--accent); }
.form__submit { display: inline-flex; align-items: center; gap: 0.75rem; align-self: flex-start; background: var(--accent); color: var(--dark); border: none; border-radius: 2px; padding: 0.85rem 2rem; font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: background 0.2s, transform 0.2s; }
.form__submit:hover { background: #d4b87a; transform: translateY(-1px); }
.form__submit:active { transform: translateY(0); }
.form__submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-arrow { transition: transform 0.2s; }
.form__submit:hover .btn-arrow { transform: translateX(4px); }
.form__status { font-family: var(--font-mono); font-size: 0.78rem; min-height: 1.2em; }
.form__status--success { color: #7dbf7d; }
.form__status--error   { color: #e07070; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer { background: var(--dark); border-top: 1px solid var(--rule-dark); display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 3rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: rgba(247,245,240,0.3); }

/* ─── REVEAL ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .section { padding: 5rem 1.5rem; }
  .section--dark .section__header, .section--dark > * { padding-left: 1.5rem; padding-right: 1.5rem; }
  .timeline__item { grid-template-columns: 1fr; gap: 0.5rem; }
  .projects__grid { grid-template-columns: 1fr; padding: 0 1.5rem; }
  .contact__layout { grid-template-columns: 1fr; gap: 3rem; padding: 0 1.5rem; }
  .form__row { grid-template-columns: 1fr; }
  .footer { padding: 1.25rem 1.5rem; }
  .skills__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 500px) {
  .skills__grid { grid-template-columns: 1fr; }
  .hero__name { font-size: 3.5rem; }
}
