/* =========================================================
   Shahin — Portfolio
   Cinematic Red & Deep Obsidian Design System
   Inspired by: High-Impact Cyber Crimson & Carbon Black
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800;900&display=swap');

:root {
  /* surfaces (deep stealth carbon & pitch obsidian) */
  --bg: #050507;
  --bg-2: #0a0709;
  --surface: #0e090c;
  --surface-2: #150c10;
  --surface-hover: #1f1016;
  --surface-card: linear-gradient(180deg, rgba(22, 12, 16, 0.82) 0%, rgba(10, 6, 8, 0.95) 100%);
  --surface-red: linear-gradient(155deg, #990f1e 0%, #54060f 60%, #1f0205 100%);

  --border: rgba(255, 45, 70, 0.12);
  --border-strong: rgba(255, 45, 70, 0.26);
  --border-glow: rgba(255, 30, 55, 0.45);
  --border-white: rgba(255, 255, 255, 0.12);

  --glass: rgba(10, 6, 8, 0.85);
  --glass-card: rgba(16, 10, 13, 0.78);

  /* text */
  --text: #f1f5f9;
  --text-bright: #ffffff;
  --muted: #9ca3af;
  --faint: #6b7280;

  /* accent palette: Cinematic Scarlet, Crimson & Ruby */
  --accent: #ff1f3d;
  --accent-bright: #ff3b56;
  --accent-2: #dc143c;
  --accent-dark: #8b0818;
  --accent-deep: #4a030b;
  --accent-gradient: linear-gradient(135deg, #ff2a46 0%, #dc143c 50%, #8b0818 100%);
  --accent-glow: rgba(255, 31, 61, 0.55);
  --accent-glow-strong: rgba(255, 31, 61, 0.85);
  --accent-soft: rgba(255, 31, 61, 0.12);
  --accent-soft-2: rgba(255, 31, 61, 0.06);

  /* layout */
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 10px;
  --radius-pill: 999px;
  --maxw: 1300px;
  --sidebar: 350px;
  --gap: 28px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  --shadow-sm: 0 8px 24px -8px rgba(0, 0, 0, 0.75);
  --shadow-red: 0 16px 40px -10px rgba(220, 20, 45, 0.4);

  /* typography */
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- light theme (clean editorial crimson & pure paper) ---------- */
:root[data-theme="light"] {
  --bg: #faf8f9;
  --bg-2: #f4eff1;
  --surface: #ffffff;
  --surface-2: #f5eef0;
  --surface-hover: #ebdce0;
  --surface-card: #ffffff;
  --surface-red: linear-gradient(155deg, #dc143c 0%, #990f1e 100%);

  --border: rgba(220, 20, 60, 0.12);
  --border-strong: rgba(220, 20, 60, 0.24);
  --border-glow: rgba(220, 20, 60, 0.45);
  --border-white: rgba(0, 0, 0, 0.08);

  --glass: rgba(255, 255, 255, 0.9);
  --glass-card: rgba(255, 255, 255, 0.95);

  --text: #111827;
  --text-bright: #000000;
  --muted: #4b5563;
  --faint: #9ca3af;

  --accent: #dc143c;
  --accent-bright: #e11d48;
  --accent-2: #b91c1c;
  --accent-dark: #7f1d1d;
  --accent-gradient: linear-gradient(135deg, #e11d48 0%, #dc143c 50%, #990f1e 100%);
  --accent-glow: rgba(220, 20, 60, 0.35);
  --accent-glow-strong: rgba(220, 20, 60, 0.6);
  --accent-soft: rgba(220, 20, 60, 0.08);

  --shadow: 0 20px 45px -20px rgba(100, 10, 25, 0.12);
  --shadow-sm: 0 6px 20px -8px rgba(100, 10, 25, 0.08);
  --shadow-red: 0 12px 30px -8px rgba(220, 20, 60, 0.25);
}

/* ---------- reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

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

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

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

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

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

.skip-link {
  position: fixed;
  left: 20px;
  top: -70px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 10px 25px var(--accent-glow);
  transition: top .25s var(--ease);
}

.skip-link:focus {
  top: 20px;
}

/* =========================================================
   CINEMATIC RED SPOTLIGHT & ATMOSPHERIC GLOW
   ========================================================= */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 50% -10%, rgba(255, 31, 61, 0.35) 0%, rgba(139, 8, 24, 0.2) 40%, rgba(40, 2, 8, 0.05) 70%, transparent 90%),
    var(--bg);
}

:root[data-theme="light"] .bg-decor {
  background:
    radial-gradient(1100px 700px at 50% -10%, rgba(220, 20, 60, 0.15) 0%, rgba(220, 20, 60, 0.05) 45%, transparent 80%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .5;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 650px;
  height: 650px;
  top: -120px;
  right: 5%;
  background: radial-gradient(circle, rgba(255, 31, 61, 0.3) 0%, rgba(180, 10, 30, 0.15) 50%, transparent 70%);
}

.orb-2 {
  width: 580px;
  height: 580px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(220, 20, 60, 0.22) 0%, rgba(120, 5, 15, 0.1) 50%, transparent 70%);
  animation-delay: -6s;
}

.orb-3 {
  width: 480px;
  height: 480px;
  top: 50%;
  right: 10%;
  background: radial-gradient(circle, rgba(255, 45, 75, 0.16) 0%, transparent 70%);
  animation-delay: -11s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, 35px) scale(1.08);
  }

  100% {
    transform: translate(-25px, 20px) scale(0.95);
  }
}

:root[data-theme="light"] .orb {
  opacity: .28;
}

/* Subtle dark carbon grid */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 45, 70, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 45, 70, 0.035) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(1100px 800px at 50% 15%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(1100px 800px at 50% 15%, #000 30%, transparent 85%);
}

.flow-lines {
  display: none;
}

/* =========================================================
   PAGE LAYOUT
   ========================================================= */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: var(--gap);
  align-items: start;
}

.card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  transition: all .35s var(--ease);
}

:root[data-theme="light"] .card {
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* =========================================================
   SIDEBAR / PROFILE CARD
   ========================================================= */
.sidebar {
  position: sticky;
  top: 28px;
  z-index: 40;
}

.profile-card {
  padding: 26px;
  text-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.profile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

/* Monogram: Glowing Crimson Squircle */
.profile-top .mono {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.25rem;
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 0 25px rgba(255, 31, 61, 0.6);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  transition: all .25s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg) scale(1.05);
  box-shadow: 0 0 20px var(--accent-soft);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* Profile Photo */
.profile-photo {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 4.9;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 20px -8px var(--accent-soft);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  transition: transform .6s var(--ease);
}

.profile-card:hover .profile-photo img {
  transform: scale(1.04);
}

.profile-photo .tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(5, 5, 7, 0.75) 100%);
  opacity: 0.9;
}

/* Radar pulse status dot */
.status-dot {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: radarPulse 2s cubic-bezier(.2, 0, 0, 1) infinite;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.profile-name {
  font-family: var(--font-head);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -.03em;
  margin-top: 20px;
  color: var(--text-bright);
}

.profile-role {
  color: var(--muted);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin-top: 6px;
  min-height: 1.4em;
}

html.js .role-static {
  display: none;
}

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

html:not(.js) .role-rotator::after {
  display: none;
}

.role-rotator::after {
  content: "|";
  color: var(--accent);
  font-weight: 800;
  margin-left: 2px;
  animation: blinkCaret .9s steps(1) infinite;
}

@keyframes blinkCaret {
  50% {
    opacity: 0;
  }
}

/* Profile Meta */
.profile-meta {
  margin: 24px 0 12px;
  text-align: left;
  display: grid;
  gap: 12px;
}

.profile-meta li {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: .88rem;
  color: var(--muted);
}

.profile-meta svg {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 8px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: all .2s var(--ease);
}

.profile-meta li:hover svg {
  background: var(--accent-gradient);
  border-color: transparent;
  stroke: #fff;
  transform: scale(1.06);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.profile-meta a {
  color: var(--muted);
  transition: color .2s var(--ease);
  word-break: break-word;
}

.profile-meta a:hover {
  color: var(--text-bright);
}

/* Social buttons */
.profile-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
}

.social-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  transition: all .25s var(--ease);
}

.social-btn svg {
  width: 19px;
  height: 19px;
  fill: var(--muted);
  transition: fill .2s var(--ease);
}

.social-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 6px 20px -4px var(--accent-glow);
}

.social-btn:hover svg {
  fill: #fff;
}

/* =========================================================
   BUTTONS (MODERN CAPSULES & RED GLOW)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  border: 1px solid transparent;
  transition: all .25s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-block {
  width: 100%;
}

/* Red Pill Primary Button */
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 24px -4px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -4px var(--accent-glow-strong);
  color: #fff;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}

.btn-primary:hover::after {
  left: 140%;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-bright);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -4px var(--accent-soft);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* =========================================================
   FLOATING PILL NAVBAR
   ========================================================= */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.topbar {
  position: sticky;
  top: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 0 16px var(--accent-glow);
}

.brand-text {
  font-size: 1.05rem;
  letter-spacing: -.02em;
  color: var(--text-bright);
}

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

.nav {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all .2s var(--ease);
}

.nav-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  opacity: .85;
}

.nav-link:hover {
  color: var(--text-bright);
  background: var(--surface-2);
}

.nav-link.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 4px 18px -2px var(--accent-glow);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--text-bright);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

.nav-toggle span:nth-child(1) {
  top: 14px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 26px;
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

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

/* =========================================================
   SECTIONS & CINEMATIC HEADERS
   ========================================================= */
.section {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 46px;
  scroll-margin-top: 96px;
  position: relative;
  overflow: hidden;
}

:root[data-theme="light"] .section {
  background: var(--surface);
}

.section-head {
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Red outline pill badge */
.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-head);
  font-size: .84rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 14px var(--accent-soft);
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.03em;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1.15;
  color: var(--text-bright);
}

.section-title::before {
  display: none !important;
}

.section-note {
  color: var(--muted);
  margin-top: 14px;
  max-width: 60ch;
  font-size: .95rem;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  padding: clamp(42px, 4.5vw, 64px) 48px;
  position: relative;
  border: 1px solid var(--border-strong);
}

.hero:focus {
  outline: none;
}

/* Subtle huge outline watermark in background of hero */
.hero::before {
  content: "DEVELOPER";
  position: absolute;
  right: -20px;
  top: 10px;
  font-family: var(--font-head);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  letter-spacing: .08em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 31, 61, 0.12);
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  background: var(--accent-soft);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 31, 61, 0.35);
  margin-bottom: 16px;
}

.eyebrow span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-name-line {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.45rem);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.hero-name-line strong {
  color: var(--text-bright);
  font-weight: 700;
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.08;
  font-size: clamp(2.4rem, 1.3rem + 4.6vw, 4.1rem);
  margin: 12px 0 18px;
  color: var(--text-bright);
}

/* Fiery Crimson highlight */
.hl {
  display: inline;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255, 31, 61, 0.45);
}

.hero-lead {
  color: var(--muted);
  max-width: 65ch;
  margin-top: 18px;
  font-size: 1.05rem;
  line-height: 1.72;
}

.hero-lead strong {
  color: var(--text-bright);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Hero Stats: Sleek Dark Red Metric Cards */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 42px;
}

.hero-stats>div {
  flex: 1 1 140px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  transition: all .25s var(--ease);
}

.hero-stats>div:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px -10px var(--accent-soft);
}

.hero-stats dt {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.hero-stats dd {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
  margin-top: 4px;
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 34px;
}

.about-text p+p {
  margin-top: 16px;
}

.about-text {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.75;
}

.about-text strong {
  color: var(--text-bright);
  font-weight: 600;
}

.about-facts {
  align-self: start;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.about-facts li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  transition: background .2s var(--ease);
}

.about-facts li:hover {
  background: var(--surface-hover);
}

.about-facts li:last-child {
  border-bottom: 0;
}

.about-facts span {
  color: var(--faint);
  font-weight: 500;
}

.about-facts strong {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  color: var(--text-bright);
}

.about-facts a {
  color: var(--text);
}

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

/* International reach */
.intl {
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.intl-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-bright);
}

.intl-title .pin {
  color: var(--accent);
}

.intl-note {
  color: var(--muted);
  margin: 8px 0 20px;
  max-width: 70ch;
  font-size: .94rem;
}

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

.country {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  transition: all .25s var(--ease);
}

.country:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-hover);
  color: #fff;
  box-shadow: 0 6px 18px -4px var(--accent-soft);
}

.country .flag {
  width: 28px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.country .flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* =========================================================
   PROJECTS SECTION
   ========================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.filter {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: .84rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all .25s var(--ease);
}

.filter:hover {
  color: var(--text-bright);
  border-color: var(--border-strong);
}

.filter.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px -4px var(--accent-glow);
}

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

.project {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .35s var(--ease);
  position: relative;
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 22px 45px -15px rgba(0, 0, 0, 0.85), 0 0 25px -6px var(--accent-soft);
}

.project.is-hidden {
  display: none;
}

.project-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #08080c;
  border-bottom: 1px solid var(--border);
}

.project-shot picture {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}

.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s var(--ease);
}

.project:hover .project-shot img {
  transform: scale(1.05);
}

.project-shot.no-shot picture {
  display: none;
}

.project-shot .ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: .84rem;
  text-align: center;
  padding: 12px;
  background: repeating-linear-gradient(45deg, #0d080a, #0d080a 12px, #140c10 12px, #140c10 24px);
}

.project-shot .ph svg {
  width: 34px;
  height: 34px;
  fill: var(--faint);
}

.project-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .03em;
  background: rgba(8, 5, 7, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 31, 61, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.project-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-body h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-bright);
}

.project-body p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
  flex: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: .92rem;
  margin-top: 6px;
  transition: all .2s var(--ease);
}

.project-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform .25s var(--ease);
}

.project-link:hover {
  color: #fff;
}

.project-link:hover svg {
  transform: translate(3px, -3px);
}

/* =========================================================
   SERVICES SECTION (GLOWING CRIMSON VELVET CARDS)
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.service {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .35s var(--ease);
}

.service:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  background: var(--surface-hover);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.8), 0 0 25px -8px var(--accent-soft);
}

.service-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 31, 61, 0.25);
  margin-bottom: 22px;
  transition: all .25s var(--ease);
}

.service:hover .service-icon {
  transform: scale(1.08);
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 24px var(--accent-glow);
}

.service:hover .service-icon svg {
  stroke: #fff;
}

.service-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all .25s var(--ease);
}

.service h3 {
  font-family: var(--font-head);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-bright);
}

.service p {
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.68;
}

@media (min-width: 861px) {
  .service h3 {
    min-height: 2.6em;
  }
}

/* =========================================================
   SKILLS & TOOLS SECTION
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-group {
  padding: 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease);
}

.skill-group:hover {
  border-color: var(--border-glow);
}

.skill-group h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tags li {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all .2s var(--ease);
}

.tags li:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-soft);
}

/* =========================================================
   TIMELINE (EXPERIENCE)
   ========================================================= */
.timeline {
  position: relative;
  margin-left: 8px;
  padding-left: 32px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dark), transparent);
}

.timeline-item {
  position: relative;
}

.timeline-item+.timeline-item {
  margin-top: 24px;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 22px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-card {
  padding: 26px 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .25s var(--ease);
}

.timeline-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.7);
}

.timeline-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.timeline-top h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-bright);
}

.timeline-date {
  font-size: .8rem;
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 31, 61, 0.35);
}

.timeline-org {
  color: var(--muted);
  font-weight: 500;
  margin: 6px 0 14px;
  font-size: .95rem;
}

.timeline-points {
  display: grid;
  gap: 8px;
}

.timeline-points li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
}

.timeline-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* =========================================================
   EDUCATION & CREDENTIALS (BENTO GRID)
   ========================================================= */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.edu-card {
  padding: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: all .35s var(--ease);
  position: relative;
  overflow: hidden;
}

.edu-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  background: var(--surface-hover);
  box-shadow: 0 22px 45px -15px rgba(0, 0, 0, 0.85), 0 0 25px -8px var(--accent-soft);
}

.edu-card-featured {
  grid-column: 1 / -1;
  background: linear-gradient(150deg, rgba(25, 14, 18, 0.85) 0%, rgba(14, 8, 11, 0.95) 100%);
  border-color: rgba(255, 45, 70, 0.22);
}

.edu-card-featured:hover {
  border-color: var(--border-glow);
}

.edu-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.edu-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 31, 61, 0.28);
  transition: all .25s var(--ease);
}

.edu-card:hover .edu-icon {
  background: var(--accent);
  box-shadow: 0 0 22px var(--accent-glow);
  transform: scale(1.06);
}

.edu-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--accent);
  transition: fill .25s var(--ease);
}

.edu-card:hover .edu-icon svg {
  fill: #fff;
}

.edu-head-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.edu-tag {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 2px;
}

.edu-card h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-bright);
  line-height: 1.2;
}

.edu-subtitle {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
}

.edu-desc {
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.68;
  margin-bottom: 20px;
  flex: 1;
}

.edu-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.edu-skills span {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  transition: all .2s var(--ease);
}

.edu-card:hover .edu-skills span {
  border-color: rgba(255, 45, 70, 0.25);
}

.edu-skills span:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-soft);
}

.edu-sub {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-bright);
}

.edu-projects {
  display: grid;
  gap: 14px;
}

.edu-projects li {
  display: grid;
  gap: 4px;
  padding-left: 20px;
  position: relative;
}

.edu-projects li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.edu-projects strong {
  font-weight: 600;
  color: var(--text-bright);
}

.edu-projects span {
  color: var(--muted);
  font-size: .88rem;
}

/* =========================================================
   CONTACT SECTION (OUTLINE WATERMARK 'GET IN TOUCH')
   ========================================================= */
#contact {
  position: relative;
}

#contact::after {
  content: "GET IN TOUCH";
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: .06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 31, 61, 0.1);
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.contact-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  padding: 24px 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: all .35s var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 31, 61, 0.45), transparent);
  opacity: 0;
  transition: opacity .35s var(--ease);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  background: var(--surface-hover);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.8), 0 0 30px -10px var(--accent-soft);
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1;
}

.contact-card .cm-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 31, 61, 0.08);
  border: 1px solid rgba(255, 31, 61, 0.22);
  color: var(--accent);
  transition: all .25s var(--ease);
}

.contact-card .cm-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all .25s var(--ease);
}

.contact-card:hover .cm-icon {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 22px var(--accent-glow);
  transform: scale(1.05);
}

.contact-card:hover .cm-icon svg {
  stroke: #ffffff;
}

.contact-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.contact-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
}

.contact-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.contact-value {
  font-family: var(--font-head);
  font-size: clamp(0.98rem, 1.2vw, 1.15rem);
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.contact-hint {
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.contact-arrow-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: all .25s var(--ease);
}

.contact-arrow-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all .25s var(--ease);
}

.contact-card:hover .contact-arrow-btn {
  background: rgba(255, 31, 61, 0.15);
  border-color: rgba(255, 31, 61, 0.45);
  transform: translate(2px, -2px);
}

.contact-card:hover .contact-arrow-btn svg {
  stroke: var(--accent);
  transform: translate(1px, -1px);
}

@media (max-width: 560px) {
  .contact-card {
    padding: 20px;
  }

  .contact-arrow-btn {
    display: none;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  text-align: center;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  justify-items: center;
}

:root[data-theme="light"] .site-footer {
  background: var(--surface);
}

.foot-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--text-bright);
}

.foot-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.foot-links a {
  color: var(--muted);
  font-size: .88rem;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  transition: all .2s var(--ease);
}

.foot-links a:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.foot-copy {
  color: var(--faint);
  font-size: .84rem;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 28px -6px var(--accent-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all .3s var(--ease);
}

.to-top svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--accent-bright);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 36px -4px var(--accent-glow-strong);
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   LEFT VERTICAL NAV RAIL (DESKTOP DOCK)
   ========================================================= */
.nav-rail {
  display: none;
}

.rail-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 16px;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: .64rem;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  line-height: 1.15;
  transition: all .2s var(--ease);
}

.rail-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.rail-link:hover {
  color: var(--text-bright);
  background: var(--surface-2);
}

.rail-link.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 6px 18px -4px var(--accent-glow);
}

@media (min-width: 1140px) {
  .page {
    grid-template-columns: 92px var(--sidebar) 1fr;
  }

  .nav-rail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 28px;
    align-self: start;
    padding: 18px 8px;
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  :root[data-theme="light"] .nav-rail {
    background: var(--surface);
  }

  .topbar {
    display: none;
  }

  .section {
    scroll-margin-top: 30px;
  }
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 1139px) {
  :root {
    --gap: 22px;
  }

  .page {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .sidebar {
    position: static;
  }

  .profile-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    text-align: left;
    gap: 26px;
    align-items: center;
  }

  .profile-photo {
    aspect-ratio: 4 / 5;
  }

  .profile-name {
    margin-top: 0;
  }

  .profile-meta {
    margin-top: 14px;
  }

  .profile-socials {
    justify-content: flex-start;
  }

  .btn-block#download-cv {
    grid-column: 1 / -1;
  }

  .profile-card>*:not(.profile-photo) {
    grid-column: 2;
  }

  .profile-card .profile-photo {
    grid-row: 1 / span 5;
  }
}

@media (max-width: 860px) {
  .section {
    padding: 32px 24px;
  }

  .hero {
    padding: 34px 24px;
  }

  .about-grid,
  .contact-cards,
  .edu-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  /* collapse profile card to single column on small screens */
  .profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-card>*:not(.profile-photo) {
    grid-column: 1;
  }

  .profile-card .profile-photo {
    grid-row: auto;
    max-width: 260px;
    margin: 0 auto;
    width: 100%;
  }

  .profile-socials {
    justify-content: center;
  }

  .profile-meta {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  /* mobile nav */
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transform: scale(.97);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: all .25s var(--ease);
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .nav-link {
    width: 100%;
    padding: 10px 16px;
    font-size: .92rem;
  }

  .topbar {
    position: sticky;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 14px;
  }

  .section {
    padding: 26px 18px;
  }

  .hero {
    padding: 26px 18px;
  }

  .hero-cta .btn {
    flex: 1 1 100%;
  }

  .hero-stats>div {
    flex: 1 1 100%;
  }

  .profile-card {
    padding: 22px 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

  .orb {
    animation: none;
  }
}