/* ==========================================================================
   RHYS WYLES — Personal Website
   Design System + Component Styles
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================================================== */
:root {
  /* --- Color Palette (Dark Theme — 60/30/10 rule) --- */
  /* 60% — Background layers */
  --bg-primary: hsl(240, 10%, 8%);
  /* #131316 — page background */
  --bg-surface: hsl(240, 8%, 12%);
  /* #1C1C21 — cards, sections */
  --bg-elevated: hsl(240, 6%, 16%);
  /* #262629 — hover, nav */

  /* 30% — Text & secondary */
  --text-primary: hsl(0, 0%, 93%);
  /* #EDEDED — headings, body */
  --text-secondary: hsl(240, 5%, 60%);
  /* #9494A0 — muted, labels */
  --text-tertiary: hsl(240, 4%, 45%);
  /* #6E6E78 — very muted */

  /* 10% — Accent (electric violet) */
  --accent: hsl(263, 90%, 64%);
  /* #7C3AED */
  --accent-hover: hsl(263, 90%, 74%);
  /* #A78BFA */
  --accent-muted: hsl(263, 40%, 18%);
  /* subtle accent background */

  /* Borders & dividers */
  --border: hsl(240, 5%, 18%);
  /* #2C2C31 */
  --border-light: hsl(240, 5%, 22%);

  /* --- Typography --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Type scale — Major Third (1.25) from 18px base */
  --text-xs: 0.72rem;
  /* ~13px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1.125rem;
  /* 18px */
  --text-lg: 1.25rem;
  /* 20px */
  --text-xl: 1.563rem;
  /* 25px */
  --text-2xl: 1.953rem;
  /* 31px */
  --text-3xl: 2.441rem;
  /* 39px */
  --text-4xl: clamp(2.5rem, 5vw, 3.815rem);
  /* 40-61px fluid */
  --text-5xl: clamp(3rem, 6vw, 4.768rem);
  /* 48-76px fluid */

  /* --- Spacing (8pt grid) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
  --space-11: 128px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px hsla(263, 90%, 64%, 0.2);
  --shadow-accent: 0 8px 30px hsla(263, 90%, 64%, 0.15), 0 0 0 1px hsla(263, 90%, 64%, 0.08);

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* --- Border radius --- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* --- Layout --- */
  --max-width: 1200px;
  --nav-height: 56px;
  --content-width: 800px;
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}


/* ==========================================================================
   3. ACCENT LINE (top of page)
   ========================================================================== */
.accent-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover), var(--accent));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  z-index: 1001;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}


/* ==========================================================================
   4. NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: var(--max-width);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  z-index: 1000;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: background var(--transition-base), box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.nav.scrolled {
  background: rgba(19, 19, 22, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav__logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  transition: color var(--transition-fast);
}

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

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.btn--nav {
  padding: 8px 18px;
  min-height: 36px;
  font-size: var(--text-xs);
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  cursor: pointer;
  z-index: 1002;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav__toggle.open span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-11) var(--space-7) var(--space-9);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Constellation canvas — fixed behind hero content */
#constellationCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Subtle grain overlay for tactile depth */
.hero::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero>* {
  position: relative;
  z-index: 1;
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: var(--space-4);
  letter-spacing: 1px;
}

.hero__name {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: var(--space-6);
}

.hero__description {
  max-width: 540px;
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-7);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}


/* ==========================================================================
   6. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  min-height: 48px;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-muted);
  transform: translateY(-2px);
  color: var(--accent-hover);
}

/* --- Social Icon Buttons (Hero) --- */
.socials {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.social-link:hover {
  color: var(--accent);
  background: var(--accent-muted);
}

.social-link svg {
  width: 22px;
  height: 22px;
}


/* ==========================================================================
   7. SECTIONS — Common Patterns
   ========================================================================== */
.section {
  padding: var(--space-10) var(--space-7);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__header {
  margin-bottom: var(--space-8);
}

.section__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.2;
}

.section__divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-top: var(--space-4);
  border-radius: var(--radius-full);
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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


/* ==========================================================================
   8. ABOUT SECTION
   ========================================================================== */
.about__content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-8);
  align-items: start;
}

.about__text p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-5);
  max-width: 65ch;
}

.about__text p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about__photo-wrapper {
  position: relative;
}

.about__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  filter: grayscale(20%);
  transition: filter var(--transition-base), border-color var(--transition-base);
}

.about__photo:hover {
  filter: grayscale(0%);
  border-color: var(--accent);
}

/* Photo accent decoration */
.about__photo-wrapper::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  z-index: -1;
  transition: top var(--transition-base), left var(--transition-base);
}

.about__photo-wrapper:hover::after {
  top: 8px;
  left: 8px;
}

/* Skills / Tech tags */
.about__skills {
  margin-top: var(--space-6);
}

.about__skills-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  background: var(--accent-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent);
}

/* CV Button */
.about__cv {
  margin-top: var(--space-6);
}


/* ==========================================================================
   8b. EXPERIENCE / TIMELINE SECTION
   ========================================================================== */
.timeline {
  position: relative;
  padding-left: var(--space-7);
  max-width: var(--content-width);
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-8);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

/* Dot marker on the line */
.timeline__marker {
  position: absolute;
  left: calc(-1 * var(--space-7) + 2px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline__content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.timeline__content:hover {
  border-color: hsla(263, 90%, 64%, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.timeline__header {
  margin-bottom: var(--space-3);
}

.timeline__role {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline__company {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  margin-top: var(--space-1);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
}

.timeline__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 65ch;
}


/* ==========================================================================
   8c. SCROLL ARROWS — Section navigation indicators
   ========================================================================== */
.scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: var(--space-7) auto 0;
  color: var(--accent);
  opacity: 0.5;
  border-radius: var(--radius-full);
  transition: opacity var(--transition-base), color var(--transition-base);
  animation: scroll-bounce 2s ease-in-out infinite;
  cursor: pointer;
}

.scroll-arrow:hover {
  opacity: 1;
  color: var(--accent-hover);
}

.scroll-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scroll-arrow svg {
  width: 24px;
  height: 24px;
}

@keyframes scroll-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}


/* ==========================================================================
   9. PORTFOLIO SECTION
   ========================================================================== */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-6);
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
  border-color: hsla(263, 90%, 64%, 0.25);
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  transition: transform var(--transition-slow);
}

.project-card:hover .project-card__image {
  transform: scale(1.03);
}

.project-card__image-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.project-card__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card__iframe {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: 0 0;
  border: none;
  pointer-events: none;
  background-color: var(--bg-surface);
  transition: transform var(--transition-slow);
}

.project-card:hover .project-card__iframe {
  transform: scale(0.515);
}

/* Placeholder for projects without a live preview */
.project-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  transition: color var(--transition-base);
}

.project-card:hover .project-card__placeholder {
  color: var(--accent);
}

.project-card__body {
  padding: var(--space-6);
}

.project-card__type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.project-card__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.project-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.project-card__links {
  display: flex;
  gap: var(--space-4);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.project-link:hover {
  color: var(--accent);
}

.project-link svg {
  width: 18px;
  height: 18px;
}


/* ==========================================================================
   9b. PROJECT DETAIL PAGES
   ========================================================================== */
.project-detail {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-11) var(--space-7) var(--space-10);
}

.project-detail__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  transition: color var(--transition-fast);
}

.project-detail__back:hover {
  color: var(--accent);
}

.project-detail__type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-3);
}

.project-detail__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: var(--space-5);
}

.project-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.project-detail__links {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.project-detail h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  margin-top: var(--space-8);
}

.project-detail h2:first-of-type {
  margin-top: 0;
}

.project-detail p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-5);
  max-width: 65ch;
}

.project-detail ul {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-5);
}

.project-detail li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-2);
}

.project-detail li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent);
}


/* ==========================================================================
   10. CONTACT / FOOTER
   ========================================================================== */
.contact {
  text-align: center;
  padding: var(--space-10) var(--space-7) var(--space-7);
  max-width: var(--content-width);
  margin: 0 auto;
}

.contact__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: -1px;
}

.contact__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-7);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.contact__email {
  font-size: var(--text-lg);
  font-weight: 600;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) var(--space-7);
  text-align: center;
}

.footer__text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}


/* ==========================================================================
   11. RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet — 768px */
@media (max-width: 768px) {
  :root {
    --nav-height: 48px;
  }

  .nav {
    width: calc(100% - 32px);
    padding: 0 var(--space-5);
    top: 8px;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: none;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: rgba(19, 19, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: none;
    transition: right var(--transition-slow);
    gap: 0;
    padding: 0 var(--space-8);
  }

  .nav__links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--accent);
  }

  .nav__links li:first-child {
    border-top: 1px solid var(--accent);
  }

  .nav__links li.nav__cta-item {
    border-top: none;
    border-bottom: none;
    margin-top: var(--space-8);
  }

  .nav__links.open {
    right: 0;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__link {
    display: inline-block;
    width: 100%;
    padding: var(--space-5) 0;
    font-size: var(--text-lg);
  }

  .nav__link::after {
    display: none;
  }

  .btn--nav {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    font-size: var(--text-sm);
  }

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: 999;
  }

  .nav-overlay.visible {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    padding: var(--space-10) var(--space-5) var(--space-8);
  }

  .section {
    padding: var(--space-9) var(--space-5);
  }

  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .about__photo-wrapper {
    max-width: 240px;
    order: -1;
  }

  .timeline {
    padding-left: var(--space-6);
  }

  .timeline__marker {
    left: calc(-1 * var(--space-6) + 2px);
  }

  .portfolio__grid {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: var(--space-9) var(--space-5) var(--space-6);
  }
}

/* Mobile — 375px */
@media (max-width: 480px) {
  .hero__name {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .hero__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Large desktop — 1440px+ */
@media (min-width: 1440px) {

  .section,
  .hero {
    padding-left: var(--space-9);
    padding-right: var(--space-9);
  }
}


/* ==========================================================================
   12. 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;
  }

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

  .accent-line {
    animation: none;
  }
}


/* ==========================================================================
   13. UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}