/* ============================================================
   Bareq Aljuboori — About page
   Theme: refined dark, warm accent, editorial typography
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-soft: #111114;
  --surface: #15151a;
  --surface-2: #1b1b22;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f3f1;
  --muted: #a4a2ad;
  --faint: #6f6d78;
  --accent: #e8703a;       /* warm amber/terracotta, matches portrait */
  --accent-2: #f2a65a;
  --accent-soft: rgba(232, 112, 58, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px));
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: normal; color: var(--accent-2); }

/* ---------- Background decoration ---------- */
.bg-grain,
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-grain {
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-glow {
  width: 60vw;
  height: 60vw;
  max-width: 760px;
  max-height: 760px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}
.bg-glow--one { top: -18vw; right: -12vw; background: radial-gradient(circle, rgba(232,112,58,0.35), transparent 70%); }
.bg-glow--two { bottom: -20vw; left: -14vw; background: radial-gradient(circle, rgba(90,110,200,0.22), transparent 70%); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.nav__brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0e07;
  font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.nav__brand-name { font-size: 0.98rem; letter-spacing: 0.2px; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.25s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: #1a0e07 !important; }
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  margin: -10px -10px -10px 0;
  min-width: 44px;
  min-height: 44px;
  z-index: 52;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  transform-origin: center;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.nav-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
  border: 1px solid transparent;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0e07;
  box-shadow: 0 8px 30px rgba(232, 112, 58, 0.28);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(232, 112, 58, 0.4); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.btn__icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn--youtube {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}
.btn--youtube:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: none;
}
.contact__links .btn--youtube:hover { color: var(--accent-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 150px 28px 40px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 60px;
  align-items: center;
}
.hero__photo-wrap {
  position: relative;
  width: clamp(220px, 58vw, 300px);
  height: clamp(220px, 58vw, 300px);
  justify-self: center;
}
.hero__photo-clip {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  background: #0a0a0c;
}
.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}
.hero__photo-ring {
  position: absolute; inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), transparent, var(--accent));
  opacity: 0.55;
  filter: blur(4px);
  animation: spin 14s linear infinite;
  z-index: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero__tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 28px;
}
.hero__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 30px; }
.hero__meta li { display: inline-flex; align-items: center; gap: 9px; font-size: 0.92rem; color: var(--muted); }
.hero__meta svg { width: 17px; height: 17px; fill: var(--accent); flex-shrink: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero__socials { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--faint); }
.hero__socials a { color: var(--muted); transition: color 0.2s; }
.hero__socials a:hover { color: var(--accent-2); }

/* ---------- Stats ---------- */
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 70px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats li {
  background: var(--surface);
  padding: 28px 20px;
  text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.stats__num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stats__label { font-size: 0.84rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 28px;
}
.section__head { margin-bottom: 48px; max-width: 720px; }
.section__kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.section__sub { color: var(--muted); margin-top: 16px; font-size: 1.02rem; }
.section__sub a { color: var(--accent-2); border-bottom: 1px solid rgba(242,166,90,0.35); transition: color 0.2s, border-color 0.2s; }
.section__sub a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about__body p { color: var(--muted); font-size: 1.08rem; margin-bottom: 18px; }
.about__body p:first-child { color: var(--text); font-size: 1.18rem; }
.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.about__card h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--faint); margin-bottom: 18px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; }
.chips li {
  font-size: 0.86rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(232,112,58,0.2);
  color: var(--accent-2);
}

/* ---------- Timeline ---------- */
.timeline {
  --tl-col: 26px;
  --tl-gap: 14px;
  position: relative;
  padding: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-col) / 2);
  top: 8px;
  bottom: 8px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--accent), rgba(232, 112, 58, 0.12));
  pointer-events: none;
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-col) 1fr;
  column-gap: var(--tl-gap);
  align-items: start;
  padding-bottom: 28px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: relative;
  left: auto;
  top: auto;
  justify-self: center;
  align-self: start;
  margin-top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  z-index: 1;
  flex-shrink: 0;
}
.timeline__content {
  grid-column: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.timeline__content:hover { border-color: var(--border-strong); transform: translateX(4px); }
.timeline__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.timeline__top h3 { font-size: 1.18rem; font-weight: 600; }
.timeline__date { font-size: 0.82rem; color: var(--faint); white-space: nowrap; }
.timeline__org { color: var(--accent-2); font-size: 0.92rem; font-weight: 500; margin: 4px 0 12px; }
.timeline__content > p:not(.timeline__org) { color: var(--muted); font-size: 0.98rem; }
.timeline__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.timeline__tags span {
  font-size: 0.78rem; padding: 5px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.timeline__divider {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-col) 1fr;
  column-gap: var(--tl-gap);
  margin: 4px 0 28px;
}
.timeline__divider span {
  grid-column: 2;
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--faint);
  font-weight: 600;
}

/* ---------- Education ---------- */
.edu {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.edu__logo {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #7a0019, #b1132c);
  color: #ffcc00;
  font-family: var(--font-serif);
  font-weight: 700; font-size: 1.5rem;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(177,19,44,0.3);
}
.edu__body { flex: 1; }
.edu__body .timeline__org { margin-top: 4px; }
.edu__note { color: var(--faint); font-weight: 400; font-size: 0.82rem; }
.edu__body > p:not(.timeline__org) { color: var(--muted); font-size: 0.98rem; margin-top: 4px; }

/* ---------- Projects ---------- */
.project {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
  position: relative;
  overflow: hidden;
}
.project:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: 0 20px 50px rgba(0,0,0,0.45); }
.project h3 { font-size: 1.22rem; margin-bottom: 10px; }
.project p { color: var(--muted); font-size: 0.96rem; }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.project__tags span {
  font-size: 0.76rem; padding: 4px 10px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.project__link { font-size: 0.9rem; font-weight: 600; color: var(--accent-2); transition: gap 0.2s; }
.project:hover .project__link { color: var(--accent); }
.project__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(232,112,58,0.2);
  color: var(--accent-2);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.project__icon svg { width: 26px; height: 26px; }
.project:hover .project__icon { background: var(--accent); color: #1a0e07; transform: scale(1.06); }
.project__icon--img { background: none; border: 0; overflow: hidden; }
.project__icon--img img { width: 100%; height: 100%; object-fit: cover; border-radius: 13px; }
.project:hover .project__icon--img { background: none; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 22px;
}

/* Featured project */
.project--featured {
  padding: 0;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.project__featured-tag {
  display: inline-block;
  margin: 24px 0 0 28px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.5px;
}
.project__featured-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; }
.project__featured-text { padding: 18px 28px 32px; }
.project__featured-text h3 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.project__featured-text p { font-size: 1.04rem; }
.project__featured-visual {
  position: relative;
  align-self: stretch;
  min-height: 260px;
  display: grid; place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(40,220,140,0.16), transparent 62%);
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.vr-icon {
  position: relative; z-index: 2;
  width: 148px; height: 148px;
  border-radius: 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 60px rgba(40,220,140,0.28);
  animation: float 6s ease-in-out infinite;
}
.vr-ring { position: absolute; border: 1px solid rgba(40,220,140,0.32); border-radius: 50%; }
.vr-ring--1 { width: 200px; height: 200px; animation: spin 20s linear infinite; }
.vr-ring--2 { width: 280px; height: 280px; border-color: rgba(255,255,255,0.07); animation: spin 30s linear infinite reverse; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.skills__col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.skills__col h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--faint); margin-bottom: 16px;
}

/* ---------- Contact ---------- */
.section--contact { padding-top: 40px; padding-bottom: 110px; }
.contact {
  text-align: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 64px 32px;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(232,112,58,0.16), transparent 60%);
  pointer-events: none;
}
.contact__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 14px 0 16px;
  letter-spacing: -0.5px;
}
.contact__sub { color: var(--muted); max-width: 520px; margin: 0 auto 18px; font-size: 1.05rem; }
.contact__email {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--accent-2);
  border-bottom: 1px solid rgba(242, 166, 90, 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 32px 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 18px;
}
.footer__name { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__links a { font-size: 0.9rem; color: var(--muted); transition: color 0.2s; }
.footer__links a:hover { color: var(--accent-2); }
.footer__copy { font-size: 0.86rem; color: var(--faint); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero__photo-wrap { justify-self: center; }
  .hero__meta, .hero__actions, .hero__socials { justify-content: center; }
  .hero__tagline { margin-left: auto; margin-right: auto; }
  .about { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .project__featured-grid { grid-template-columns: 1fr; }
  .project__featured-visual { min-height: 180px; order: -1; }
}

@media (max-width: 680px) {
  .nav__inner {
    padding: 12px 18px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .nav__links {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    right: 16px; left: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(15, 15, 18, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    max-height: calc(100dvh - 80px - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    z-index: 51;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }

  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a {
    padding: 14px 14px;
    border-radius: 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__links a:not(.nav__cta):active { background: var(--surface-2); }
  .nav__cta { text-align: center; justify-content: center; }
  .nav__toggle { display: flex; }

  .hero {
    padding: calc(108px + env(safe-area-inset-top, 0px)) 18px 28px;
  }

  .hero__eyebrow {
    letter-spacing: 1.4px;
    font-size: 0.66rem;
    line-height: 1.65;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__meta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero__meta li { justify-content: center; text-align: center; }

  .hero__actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero__socials {
    gap: 8px 14px;
    justify-content: center;
    line-height: 1.5;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 48px;
  }

  .stats li { padding: 22px 14px; }
  .stats__num { font-size: 1.85rem; }
  .stats__label { font-size: 0.76rem; line-height: 1.35; }

  .section { padding: 64px 18px; }
  .section__head { margin-bottom: 36px; }
  .section--contact { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

  .timeline {
    --tl-col: 22px;
    --tl-gap: 12px;
  }

  .timeline__dot {
    margin-top: 18px;
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  .timeline__content { padding: 20px 18px; }

  .timeline__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .timeline__content:hover { transform: none; }

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

  .edu { grid-template-columns: 1fr; text-align: left; padding: 22px; }
  .edu__logo { justify-self: start; }

  .project__featured-tag { margin: 18px 18px 0; }
  .project__featured-text { padding: 14px 18px 22px; }
  .project__featured-text p { font-size: 0.98rem; }
  .project__featured-visual { min-height: 160px; }
  .vr-icon { width: 120px; height: 120px; border-radius: 22px; }
  .vr-ring--1 { width: 160px; height: 160px; }
  .vr-ring--2 { width: 220px; height: 220px; }

  .project { padding: 22px; }
  .project:active { transform: scale(0.99); }

  .contact { padding: 40px 20px; border-radius: 22px; }
  .contact__sub { font-size: 1rem; padding: 0 4px; }
  .contact__email {
    font-size: 0.98rem;
    overflow-wrap: anywhere;
    padding: 0 8px;
  }
  .contact__links {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .contact__links .btn {
    width: 100%;
    max-width: 320px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 18px calc(28px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }
  .footer__links {
    justify-content: center;
    gap: 12px 16px;
  }
}

@media (max-width: 380px) {
  .nav__brand-name { display: none; }
  .hero__name { letter-spacing: -0.5px; }
  .stats__label { font-size: 0.72rem; }
}

@media (hover: none) {
  .project:hover,
  .btn--primary:hover,
  .btn--ghost:hover,
  .timeline__content:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
