/* ============================================
   AARON BONSIGNORI — Personal Site
   ============================================ */

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

:root {
  --bg:       #080c14;
  --bg-2:     #0d1526;
  --bg-3:     #111e35;
  --accent:   #00BFFF;
  --accent-d: rgba(0, 191, 255, 0.12);
  --text:     #f0f4ff;
  --muted:    #6b7fa0;
  --border:   rgba(0, 191, 255, 0.1);
  --glass:    rgba(13, 21, 38, 0.65);
  --radius:   2px;
  --nav-h:    64px;
  --max-w:    1120px;
  --ff-title: 'Syne', sans-serif;
  --ff-body:  'DM Sans', sans-serif;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --trans:    0.35s var(--ease);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button {
  font-family: var(--ff-body);
  cursor: none;
}

/* --- CURSOR --- */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease),
              height 0.25s var(--ease),
              opacity 0.25s var(--ease);
  mix-blend-mode: screen;
  will-change: left, top;
}

.cursor.is-hover {
  width: 44px;
  height: 44px;
  opacity: 0.35;
}

@media (hover: none) {
  .cursor { display: none; }
  body, button, a { cursor: auto; }
}

/* --- BACKGROUND GRID --- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,191,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,191,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--ff-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 3px;
  background: none;
  border: none;
  padding: 0;
  transition: opacity var(--trans);
}
.nav-logo:hover { opacity: 0.75; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.change-path-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  padding: 7px 16px;
  border-radius: var(--radius);
  transition: color var(--trans), border-color var(--trans);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.change-path-btn:hover {
  color: var(--text);
  border-color: rgba(0,191,255,0.4);
}
.change-path-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-contact {
  display: flex;
  gap: 20px;
}

.nav-contact-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--trans);
}
.nav-contact-link:hover { color: var(--accent); }

/* --- PAGE CONTAINER --- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.page-enter {
  animation: pageEnter 0.45s var(--ease) both;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HOMEPAGE — ABOVE THE FOLD
   ============================================ */

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Constrain to viewport so cards are visible without scrolling */
  min-height: calc(100vh - var(--nav-h) - 52px);
  max-height: calc(100vh - var(--nav-h) - 52px);
  padding: 20px 28px 8px;
  gap: 20px;
  /* Prevent overflow clipping content on very short screens */
  overflow: visible;
}

/* Two-column row: text left, photo right */
.hero-top {
  display: flex;
  align-items: center;
  gap: 44px;
  max-width: 920px;
  width: 100%;
}

.hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* --- PHOTO CIRCLE --- */
.hero-photo-wrap {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  /* Layered glow effect */
  box-shadow:
    0 0 0 5px rgba(0, 191, 255, 0.07),
    0 0 32px rgba(0, 191, 255, 0.22),
    0 0 72px rgba(0, 191, 255, 0.09);
  overflow: hidden;
  position: relative;
}

/* Subtle inner ring */
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(0, 191, 255, 0.12);
  pointer-events: none;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- TYPEWRITER --- */
.typewriter-container {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  opacity: 0.8;
  height: 18px;
  white-space: nowrap;
}

.typewriter-prefix { opacity: 0.45; }

.typewriter-cursor {
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* --- TITLE --- */
.home-title {
  font-family: var(--ff-title);
  font-weight: 800;
  /* Reduced from ~96px max to keep above fold */
  font-size: clamp(36px, 5.5vw, 62px);
  line-height: 1.0;
  letter-spacing: -2px;
  margin-bottom: 10px;
}

.home-subtitle {
  font-size: 15px;
  color: var(--muted);
  /* No bottom margin — gap on .home-hero handles spacing to choice grid */
}

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

/* --- CHOICE GRID --- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 920px;
  width: 100%;
}

.choice-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* Compact padding for above-the-fold */
  padding: 20px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--trans),
              transform var(--trans),
              box-shadow var(--trans);
}

.choice-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,191,255,0.06), transparent 60%);
  opacity: 0;
  transition: opacity var(--trans);
  pointer-events: none;
}

.choice-card:hover {
  border-color: rgba(0,191,255,0.38);
  transform: translateY(-5px);
  box-shadow: 0 24px 56px rgba(0,191,255,0.09);
}
.choice-card:hover::after { opacity: 1; }

.choice-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.choice-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,191,255,0.07);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.choice-title {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text);
}

.choice-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.choice-arrow {
  font-size: 18px;
  color: var(--accent);
  align-self: flex-end;
  transition: transform var(--trans);
  line-height: 1;
}
.choice-card:hover .choice-arrow { transform: translateX(5px); }

/* --- HOME FOOTER --- */
.home-footer {
  padding: 16px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--trans);
}
.home-footer a:hover { color: var(--accent); }

.footer-sep { opacity: 0.25; }

/* ============================================
   PATH PAGES
   ============================================ */

.path-hero {
  padding: 72px 28px 56px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.path-label {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.14em;
  opacity: 0.65;
  margin-bottom: 20px;
}

.path-title {
  font-family: var(--ff-title);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.05;
  letter-spacing: -2.5px;
}

/* --- SECTIONS --- */
.path-section {
  padding: 72px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.path-section + .path-section {
  border-top: 1px solid var(--border);
}

.section-contact { margin-bottom: 80px; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 48px;
}

.section-num {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: 0.1em;
}

.section-title {
  font-family: var(--ff-title);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -1.5px;
  color: var(--text);
  line-height: 1.1;
}

/* --- REVEAL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

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

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* --- SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color var(--trans), transform var(--trans);
}

.service-card:hover {
  border-color: rgba(0,191,255,0.28);
  transform: translateY(-4px);
}

.service-icon { margin-bottom: 22px; }

.service-title {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text);
}

.service-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}

/* --- PROJECTS --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}

.project-card:hover {
  border-color: rgba(0,191,255,0.32);
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0,191,255,0.07);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project-card--coming { opacity: 0.55; }

.project-card--featured {
  border-color: rgba(0,191,255,0.18);
  background: rgba(0,191,255,0.03);
}

.project-tag {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(0,191,255,0.1);
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
  align-self: flex-start;
}

.project-tag--soon {
  color: var(--muted);
  background: rgba(107,127,160,0.1);
}

.project-tag--own {
  color: var(--accent);
  background: rgba(0,191,255,0.14);
}

.project-name {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.project-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.project-link {
  font-size: 13px;
  color: var(--accent);
  opacity: 0.55;
  transition: opacity var(--trans);
}

.project-card:hover .project-link { opacity: 1; }

/* --- PROCESS STEPS --- */
.process-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.process-step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.process-step:first-child { padding-left: 0; }
.process-step:last-child  { padding-right: 0; }

.process-arrow {
  color: rgba(0,191,255,0.35);
  font-size: 22px;
  padding-top: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.step-num {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  opacity: 0.5;
}

.step-title {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================
   TIMELINE V2 — PATH B
   Visual vertical timeline with prominent years
   ============================================ */

.timeline-v2 {
  display: flex;
  flex-direction: column;
  max-width: 760px;
}

.tl-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  position: relative;
}

/* Vertical connecting line — runs from dot to bottom of item */
.tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  /* 76px year col + dot centered at 7px = 83px from left */
  left: 83px;
  top: 20px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    rgba(0, 191, 255, 0.2) 0%,
    rgba(0, 191, 255, 0.05) 80%,
    transparent 100%);
}

/* Left: year label */
.tl-left {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-right: 20px;
  padding-top: 2px;
}

.tl-year {
  font-family: var(--ff-title);
  font-weight: 800;
  font-size: 26px;
  color: var(--accent);
  opacity: 0.22;
  line-height: 1;
  letter-spacing: -1px;
  transition: opacity var(--trans);
}

.tl-year--now {
  font-size: 14px;
  font-family: 'Courier New', monospace;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}

.tl-item--current .tl-year { opacity: 0.75; }

.tl-item:hover .tl-year { opacity: 0.45; }
.tl-item--current:hover .tl-year { opacity: 0.9; }

/* Right: dot + content */
.tl-right {
  display: flex;
  gap: 20px;
  padding-bottom: 52px;
}

.tl-item:last-child .tl-right { padding-bottom: 0; }

/* Timeline dot */
.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
  transition: border-color var(--trans), box-shadow var(--trans);
}

.tl-item:hover .tl-dot {
  border-color: var(--accent);
}

.tl-dot--accent {
  border-color: var(--accent);
  background: rgba(0, 191, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.08), 0 0 16px rgba(0, 191, 255, 0.3);
}

/* Pulsing ring on current item */
.tl-dot--accent::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(0, 191, 255, 0.2);
  animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.9); opacity: 0.6; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Timeline content */
.tl-content { flex: 1; min-width: 0; }

.tl-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tl-period {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  opacity: 0.6;
  letter-spacing: 0.08em;
}

.tl-company {
  font-size: 13px;
  color: var(--muted);
}

.tl-link {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--trans);
}
.tl-link:hover { color: var(--accent); }

.tl-role {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.2;
}

.tl-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}

/* --- SKILLS --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.skill-group {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color var(--trans);
}
.skill-group:hover { border-color: rgba(0,191,255,0.24); }

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.skill-group-name {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.skill-list li {
  font-size: 14px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.skill-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.45;
}

/* --- CV --- */
.cv-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 480px;
}

.cv-intro {
  font-size: 16px;
  color: var(--muted);
}

/* --- CONTACT --- */
.contact-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 620px;
}

.contact-intro {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 14px;
  text-decoration: none;
  transition: background var(--trans),
              transform var(--trans),
              box-shadow var(--trans),
              border-color var(--trans),
              color var(--trans);
  white-space: nowrap;
  border: 1px solid transparent;
}

.contact-btn--primary {
  background: var(--accent);
  color: #050a12;
  font-weight: 500;
  border-color: var(--accent);
}
.contact-btn--primary:hover {
  background: rgba(0,191,255,0.88);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,191,255,0.22);
}

.contact-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.contact-btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* --- STORY (PATH C) --- */
.story-content { max-width: 680px; }

.story-lead {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 36px;
}

.story-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.story-body p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
}

/* --- PERSONAL CARDS (PATH C) --- */
.personal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.personal-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: border-color var(--trans), transform var(--trans);
}
.personal-card:hover {
  border-color: rgba(0,191,255,0.24);
  transform: translateY(-3px);
}

/* SVG icon container — mirrors .choice-icon style */
.personal-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,191,255,0.07);
  border-radius: var(--radius);
  margin-bottom: 18px;
  flex-shrink: 0;
}

.personal-card h3 {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text);
}

.personal-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* --- INFORMAL PROJECTS (PATH C) --- */
.informal-projects {
  display: flex;
  flex-direction: column;
}

.informal-project {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.informal-project:last-child { border-bottom: none; }

.informal-project-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.informal-project-name {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  transition: color var(--trans);
  line-height: 1.3;
}

a.informal-project-name:hover { color: var(--accent); }

.informal-project-type {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.informal-project-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}

/* --- ARCALIS (PATH C) --- */
.arcalis-content {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.arcalis-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arcalis-lead {
  font-family: var(--ff-title);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 28px);
  color: var(--text);
  line-height: 1.4;
}

.arcalis-text p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}

.arcalis-link { align-self: flex-start; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .personal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .choice-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .hero-top { gap: 28px; }

  .hero-photo-wrap {
    width: 120px;
    height: 120px;
  }

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

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

  .process-flow { flex-direction: column; gap: 32px; }

  .process-step {
    text-align: left;
    padding: 0;
  }

  .process-arrow {
    transform: rotate(90deg);
    padding-top: 0;
    align-self: flex-start;
    margin-left: 16px;
  }

  .informal-project {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Timeline responsive */
  .tl-item { grid-template-columns: 56px 1fr; }
  .tl-item:not(:last-child)::after { left: 63px; }
  .tl-year { font-size: 20px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  .nav-contact { display: none; }

  .nav-right { gap: 12px; }

  /* Hero stacks on mobile: photo above text */
  .home-hero {
    max-height: none;
    min-height: calc(100vh - var(--nav-h));
    padding: 24px 20px 12px;
    justify-content: flex-start;
    gap: 20px;
  }

  .hero-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-photo-wrap {
    width: 90px;
    height: 90px;
  }

  .home-title {
    font-size: clamp(32px, 8vw, 48px);
    letter-spacing: -1.5px;
  }

  .choice-grid { gap: 10px; }

  .choice-card { padding: 18px 16px; }

  .path-title { letter-spacing: -1.5px; }

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

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

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

  .contact-links { flex-direction: column; }

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

  .path-hero { padding: 56px 20px 40px; }

  .path-section { padding: 56px 20px; }

  .section-title { letter-spacing: -1px; }

  /* Timeline mobile */
  .tl-item { grid-template-columns: 44px 1fr; }
  .tl-item:not(:last-child)::after { left: 51px; }
  .tl-year { font-size: 16px; letter-spacing: -0.5px; }
  .tl-role { font-size: 20px; }
}

@media (max-width: 420px) {
  .home-subtitle { font-size: 14px; }
  .contact-intro { font-size: 16px; }

  .tl-item { grid-template-columns: 36px 1fr; }
  .tl-item:not(:last-child)::after { left: 43px; }
  .tl-year { font-size: 13px; padding-right: 12px; }
}
