/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --bg: #0b0d10;
  --bg-elevated: #14171c;
  --bg-elevated-2: #191d24;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e6e1;
  --text-muted: #9a9a95;
  --accent: #c9a962;
  --accent-bright: #e3c078;
  --accent-contrast: #1a1408;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container-width: 1120px;
  --radius: 10px;
  --transition: 200ms ease;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul {
  margin: 0 0 0.5em 0;
}

ul { padding: 0; list-style: none; }

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

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Accessibility helpers
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-bright);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 140px 0 100px;
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 169, 98, 0.08), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(201, 169, 98, 0.05), transparent 40%);
}

.hero-inner {
  max-width: 780px;
}

.eyebrow {
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.4em;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: 1.2em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 2.2em;
  flex-wrap: wrap;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.9em;
}

.section-text {
  color: var(--text-muted);
  max-width: 720px;
  font-size: 1.05rem;
}

/* ==========================================================================
   Grids & cards
   ========================================================================== */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 1.5em;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
  color: var(--accent-bright);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ==========================================================================
   Skills / tags
   ========================================================================== */
.skill-block h3,
.edu-block h3,
.tech-stack h3 {
  font-size: 1.1rem;
  color: var(--accent-bright);
  margin-bottom: 0.8em;
}

.tag-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-list li:last-child {
  border-bottom: none;
}

.tech-stack {
  margin-top: 3em;
}

.tag-list-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list-pill li {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
}

/* ==========================================================================
   Education
   ========================================================================== */
.edu-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.edu-list li:last-child {
  border-bottom: none;
}

.edu-list strong {
  font-size: 1rem;
}

.edu-list span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-section {
  text-align: center;
}

.contact-section .btn {
  margin-top: 0.8em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-inner a:hover {
  color: var(--accent-bright);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover,
  .btn-primary:hover {
    transform: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .nav.is-open {
    max-height: 400px;
  }

  .nav a {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 110px 0 70px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
