/* ===========================
   Custom Properties
   =========================== */
:root {
  --bg: #0c0a09;
  --bg-alt: #1a1814;
  --surface: #23201b;
  --border: #3d3830;
  --text: #ede9e3;
  --text-muted: #a8a196;
  --accent: #e85d26;
  --accent-hover: #f47a4a;
  --accent-subtle: rgba(232, 93, 38, 0.08);
  --highlight: #f5c542;
  --font-body: 'Satoshi', system-ui, sans-serif;
  --font-display: 'Clash Display', system-ui, sans-serif;
  --max-width: 1120px;
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--accent-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   Skip to content
   =========================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn--small {
  padding: 8px 18px;
  font-size: 0.8rem;
}

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background var(--transition), border-color var(--transition);
}

.nav--scrolled {
  background: rgba(18, 16, 13, 0.98);
  background: oklch(0.12 0.01 60 / 0.98);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 32px;
  width: auto;
}

.nav__logo:hover { opacity: 0.8; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--transition);
}

.nav__links a:hover { color: var(--text); }

.nav__links a.nav__link--active {
  color: var(--text);
}

.nav__links .btn {
  color: var(--bg);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav__toggle--active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle--active span:nth-child(2) { opacity: 0; }
.nav__toggle--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================
   Hero
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200, 80, 30, 0.1) 0%, transparent 70%);
  background: radial-gradient(circle, oklch(0.55 0.2 30 / 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero--short {
  min-height: 70vh;
  padding: 140px 0 80px;
}

.hero__inner {
  max-width: 780px;
}

.hero__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-md);
  padding: 6px 14px;
  border: 1px solid rgba(200, 80, 30, 0.25);
  border: 1px solid oklch(0.55 0.18 30 / 0.25);
  border-radius: var(--radius);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.hero__title {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.hero__title .accent {
  color: var(--accent);
}

.hero__tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.8;
}

.hero__cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ===========================
   Sections
   =========================== */
.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__header {
  margin-bottom: var(--space-xl);
}

.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.section__intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.8;
}

/* ===========================
   About
   =========================== */
.about__prose p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  max-width: 620px;
  line-height: 1.8;
}

.about__prose p:first-child {
  color: var(--text);
  font-size: 1.1rem;
}

/* ===========================
   Timeline
   =========================== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline__item:last-child { margin-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}

.timeline__period {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.timeline__content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.timeline__summary {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.timeline__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.timeline__list li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 24px;
  position: relative;
}

.timeline__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
  font-weight: 700;
}

/* ===========================
   Focus Areas (hierarchical)
   =========================== */
.focus__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.focus__item {
  background: var(--surface);
  padding: var(--space-lg);
  transition: background var(--transition);
}

.focus__item:hover {
  background: var(--bg-alt);
}

.focus__item--primary {
  grid-column: span 1;
  padding: 40px var(--space-lg);
}

.focus__item--primary h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  color: var(--text);
}

.focus__item--primary h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.focus__item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.focus__item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===========================
   Projects (hero treatment)
   =========================== */
.project-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: start;
  transition: border-color var(--transition);
}

.project-feature:hover {
  border-color: rgba(200, 80, 30, 0.4);
  border-color: oklch(0.55 0.18 30 / 0.4);
}

.project-feature__badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.project-feature h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.project-feature p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: var(--space-lg);
}

.project-feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.project-feature__tags span {
  padding: 4px 12px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.project-feature__links {
  display: flex;
  gap: 12px;
}

/* ===========================
   Contact
   =========================== */
.contact__centered {
  max-width: 480px;
}

.contact__text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.contact__social {
  display: flex;
  gap: var(--space-md);
}

.contact__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: all var(--transition);
}

.contact__social a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===========================
   Page Nav (subpage internal)
   =========================== */
.page-nav {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
  position: sticky;
  top: 56px;
  z-index: 50;
  background: var(--bg);
}

.page-nav__links {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-nav__links::-webkit-scrollbar {
  display: none;
}

.page-nav__links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color var(--transition);
}

.page-nav__links a:hover {
  color: var(--text);
}

/* ===========================
   Footer
   =========================== */
.footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer__links {
  display: flex;
  gap: var(--space-md);
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.footer__links a:hover {
  color: var(--text);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .focus__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .focus__item--primary {
    grid-column: span 1;
  }

  .project-feature {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-alt);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    border-left: 1px solid var(--border);
    transition: right 0.3s ease-out;
    z-index: 101;
  }

  .nav__links--open { right: 0; }
  .nav__toggle { display: flex; }

  .nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 10, 0.7);
    background: oklch(0.1 0 0 / 0.7);
    z-index: 99;
  }

  .nav__overlay--visible {
    display: block;
  }

  .hero { padding: 120px 0 80px; }
  .hero__name { font-size: clamp(2.5rem, 10vw, 3.5rem); }

  .focus__grid {
    grid-template-columns: 1fr;
  }

  .section { padding: var(--space-xl) 0; }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   Entrance Animations
   =========================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }
