/* ================================================================
   Apple-inspired Portfolio — Styles
   ================================================================ */

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

:root {
  --text:        #1d1d1f;
  --text-sec:    #6e6e73;
  --accent:      #0071e3;
  --accent-dark: #0064cc;
  --accent-rgb:  0, 113, 227;
  --bg:          #ffffff;
  --bg-alt:      #f5f5f7;
  --bg-dark:     #1d1d1f;
  --border:      rgba(0,0,0,0.1);

  --nav-h:       52px;
  --pad:         130px;
  --max-w:       980px;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;

  --shadow:       0 2px 24px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 48px rgba(0,0,0,0.13), 0 0 0 1px rgba(0,0,0,0.06);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t: 0.3s var(--ease);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge */
  /* Clip horizontal overflow here, not on body — body overflow-x:hidden
     breaks position:fixed compositing on iOS causing scroll jitter */
  overflow-x: clip;
}
html::-webkit-scrollbar { display: none; } /* Chrome / Safari */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; }

/* ── NAV ───────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 200;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
  /* Own compositing layer — prevents scroll-triggered repaints on mobile */
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
#nav.scrolled { border-bottom-color: var(--border); }

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

.nav-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 150;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-link {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

/* ── HERO ──────────────────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100vh;
  height: 100svh; /* stable viewport — ignores collapsing mobile address bar */
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(0,113,227,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%,   rgba(0,113,227,0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* Hero video background — native <video> for direct URLs */
.hero-video {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
#hero.has-video .hero-video { display: block; }
#hero.has-video .hero-bg    { display: none; }

/* Hero video — Google Drive iframe embed */
.hero-video-frame {
  position: absolute;
  /* Extend beyond edges to crop Drive's letterboxing and control bar */
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  border: none;
  pointer-events: none;
  z-index: 0;
}

/* Hero background image (set via config.js) */
#hero.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#hero.has-image .hero-bg { display: none; }

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* When image is active, shift text colours to work on dark backgrounds */
#hero.has-image .hero-content { position: relative; z-index: 2; }
#hero.has-image .hero-scroll-hint { z-index: 2; }
#hero.has-image #hero-name { color: #fff; }
#hero.has-image .hero-eyebrow { color: rgba(255,255,255,0.82); }
#hero.has-image .hero-tagline { color: rgba(255,255,255,0.72); }
#hero.has-image .btn-secondary {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
#hero.has-image .btn-secondary:hover { background: rgba(255,255,255,0.28); }
#hero.has-image .scroll-line {
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
}

.hero-content {
  position: relative;
  max-width: 820px;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s 0.15s var(--ease) forwards;
}

#hero h1 {
  font-size: clamp(56px, 9vw, 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.03;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s 0.3s var(--ease) forwards;
}

.hero-tagline {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 400;
  color: var(--text-sec);
  line-height: 1.55;
  margin-bottom: 52px;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s 0.45s var(--ease) forwards;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.9s 0.6s var(--ease) forwards;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeUp 0.9s 1.2s var(--ease) forwards;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s 1.5s infinite;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 30px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--t), background var(--t), box-shadow var(--t);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb),0.35);
}
.btn-secondary {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}
.btn-secondary:hover {
  background: rgba(0,0,0,0.1);
  transform: scale(1.02);
}

/* ── LAYOUT HELPERS ────────────────────────────────────────────── */
.section     { padding: var(--pad) 24px; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #fff; }

.container { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-label.light { color: rgba(255,255,255,0.5); }

.section-header { margin-bottom: 72px; }
.section-header h2 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

/* ── HOBBIES ───────────────────────────────────────────────────── */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.hobby-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-dark);
  display: block;
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t);
}
.hobby-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
a.hobby-card { cursor: pointer; }
a.hobby-card:hover .hobby-overlay { background: linear-gradient(transparent 30%, rgba(0,0,0,0.75)); }
.hobby-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hobby-card:hover .hobby-img { transform: scale(1.04); }
.hobby-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 35%, rgba(0,0,0,0.62));
  transition: background var(--t);
}
.hobby-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px;
}
.hobby-label {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.hobby-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 3px;
  line-height: 1.4;
}

/* ── PROFILE ───────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 96px;
  align-items: center;
}

.profile-image-wrap { display: flex; justify-content: center; }

.profile-image {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3/4;
  border-radius: var(--r-lg);
  background: var(--bg-alt);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-initials {
  font-size: 72px;
  font-weight: 300;
  color: var(--text-sec);
  letter-spacing: -0.02em;
  user-select: none;
}

.profile-text h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.profile-location {
  font-size: 15px;
  color: var(--text-sec);
  margin-bottom: 28px;
}
.profile-bio {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-sec);
  margin-bottom: 36px;
}

/* ── TIMELINE ──────────────────────────────────────────────────── */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  padding: 0 0 64px 44px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15);
}

.timeline-period {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.timeline-role {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.timeline-company {
  font-size: 17px;
  color: var(--text-sec);
  margin-bottom: 18px;
}
.company-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-sec);
  text-decoration: none;
  transition: color 0.2s;
}
.company-link:hover { color: var(--text); }
.company-link-icon {
  width: 9px;
  height: 9px;
  opacity: 0.45;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.company-link:hover .company-link-icon {
  opacity: 0.9;
  transform: translate(1px, -1px);
}

.timeline-about {
  font-size: 13px;
  color: var(--text-sec);
  font-style: italic;
  margin-bottom: 18px;
  opacity: 0.8;
}

.timeline-description {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-sec);
  margin-bottom: 20px;
}
.timeline-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline-highlights li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  padding-left: 22px;
  position: relative;
}
.timeline-highlights li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
}

/* CV prompt */
.cv-prompt {
  margin-top: 56px;
  padding-left: 44px; /* align with timeline content */
}
.cv-prompt-text {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-sec);
  margin: 0;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 980px;
  background: rgba(0,0,0,0.02);
}
.cv-prompt-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
  flex-shrink: 0;
}
.cv-prompt-link:hover { color: var(--accent); }

@media (max-width: 768px) {
  .cv-prompt { padding-left: 0; }
}

/* ── CASE STUDIES ──────────────────────────────────────────────── */
/* Break out of the section's horizontal padding so cards reach the edges */
#case-studies {
  padding-left: 0;
  padding-right: 0;
  position: relative; /* anchor the swipe-fade overlay */
}

/* Right-edge gradient on mobile — signals more cards to swipe */
@media (max-width: 768px) {
  #case-studies::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s;
  }
  #case-studies.scroll-end::after {
    opacity: 0;
  }
}
#case-studies .container {
  padding-left: 24px;
  padding-right: 24px;
}

#case-grid {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overflow-y: hidden;
  scroll-padding-left: max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
  padding-top: 12px;    /* room for top shadow */
  padding-bottom: 20px; /* room for bottom shadow */
  padding-left:  max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
  padding-right: max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
}
#case-grid::-webkit-scrollbar { display: none; }

/* Single card: center it and cap the width */
#case-grid.single {
  justify-content: center;
  overflow-x: hidden;
}
#case-grid.single .case-card {
  width: min(500px, 85%);
  flex-shrink: 1;
}

.case-card {
  background: var(--bg-alt);
  border-radius: var(--r-md);
  padding: 40px 36px;
  /* White ring separates adjacent card shadows from merging */
  box-shadow: 0 0 0 4px var(--bg), var(--shadow);
  transition: box-shadow var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  scroll-snap-align: start;
  width: clamp(360px, 46vw, 504px);
}
.case-card:hover {
  box-shadow: 0 0 0 4px var(--bg), var(--shadow-hover);
  transform: translateY(-6px);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.case-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb),0.09);
  padding: 5px 12px;
  border-radius: 980px;
}

.case-company {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
  margin-bottom: 8px;
}
.case-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 18px;
}
.case-summary-wrap { margin-bottom: 20px; }
.case-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-sec);
  margin-bottom: 10px;
}
.case-summary:last-child { margin-bottom: 0; }
.case-summary-bullet {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-sec);
  padding-left: 18px;
  position: relative;
  margin-bottom: 9px;
}
.case-summary-bullet:last-child { margin-bottom: 0; }
.case-summary-bullet::before {
  content: '·';
  position: absolute;
  left: 4px;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text-sec);
  opacity: 0.5;
}

.case-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  flex: 1;
}
.case-highlights li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-sec);
  padding-left: 20px;
  position: relative;
}
.case-highlights li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}
.case-section { margin-bottom: 20px; }
.case-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.case-outcome {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: auto;
}
.case-outcome-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 8px;
}
.case-outcome-body { }
.case-outcome-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.case-outcome-value:last-child { margin-bottom: 0; }
.case-outcome-bullet {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}
.case-outcome-bullet:last-child { margin-bottom: 0; }
.case-outcome-bullet::before {
  content: '·';
  position: absolute;
  left: 4px;
  font-size: 20px;
  line-height: 1.2;
  opacity: 0.4;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.case-link:hover { text-decoration: underline; }

/* Peek card — last case study blurred with CTA overlaid */
.case-card-peek {
  position: relative;
  overflow: hidden;
  padding: 0;          /* padding lives on .case-peek-content instead */
  text-decoration: none;
  cursor: pointer;
}

.case-peek-content {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  flex: 1;
  /* blur amount and opacity set inline by script.js, scaled from caseStudyCtaBlur */
  user-select: none;
  pointer-events: none;
}

.case-peek-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 245, 247, 0.55);
  /* backdrop-filter set inline by script.js, scaled from caseStudyCtaBlur */
  border-radius: inherit;
  transition: background var(--t);
}
.case-card-peek:hover .case-peek-overlay {
  background: rgba(245, 245, 247, 0.45);
}

.case-cta-body { text-align: center; padding: 8px 24px; }
.case-cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 16px;
}
.case-cta-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}
.case-cta-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-sec);
  margin-bottom: 32px;
}
.case-cta-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}
.case-card-peek:hover .case-cta-btn {
  background: var(--accent-dark);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35);
}

/* ── CONTACT ───────────────────────────────────────────────────── */
#contact {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh; /* stable viewport — ignores collapsing mobile address bar */
  display: flex;
  align-items: center;
}
.contact-video, .contact-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.contact-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
#contact .container { position: relative; z-index: 2; }

.contact-inner {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}
.contact-inner h2 {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 20px;
}
.contact-inner > p {
  font-size: 18px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 52px;
}

.contact-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--t), background var(--t), box-shadow var(--t);
}
.contact-link-email {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.contact-link-email:hover {
  background: var(--accent-dark);
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb),0.4);
}
.contact-link-email.copied {
  background: #1a9e5c;
  transform: scale(1.02);
}
.contact-link-social {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
}
.contact-link-social:hover {
  background: rgba(255,255,255,0.18);
  transform: scale(1.02);
}

/* ── STICKY CTA ────────────────────────────────────────────────── */
.sticky-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 150;
  will-change: transform;
  padding: 14px 28px;
  background: var(--bg-dark);
  color: #fff;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.22), 0 1px 4px rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.2s;
}
.sticky-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.sticky-cta:hover {
  background: #333;
}

@media (max-width: 480px) {
  .sticky-cta {
    bottom: 20px;
    right: 20px;
    padding: 12px 22px;
    font-size: 14px;
  }
}

/* ── FOOTER ────────────────────────────────────────────────────── */
footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 28px 24px;
}
.footer-inner { text-align: center; }
footer p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* ── SCROLL REVEAL ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.75s var(--ease),
    transform 0.75s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --pad: 88px; }

  .nav-links      { display: none; }
  .nav-hamburger  { display: flex; }
  .mobile-menu    { display: flex; }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .profile-image {
    max-width: 180px;
    aspect-ratio: 1;
  }

  .timeline::before,
  .timeline-item::before { display: none; }
  .timeline-item { padding-left: 0; }

  /* 80vw cards + 12px gap → ~40px of the next card always peeks */
  #case-grid { gap: 12px; }
  .case-card { width: 80vw; padding: 28px 20px; }
  #case-grid.single .case-card { width: calc(100vw - 48px); padding: 28px 20px; }

  .hero-scroll-hint { display: none; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .contact-links { flex-direction: column; align-items: center; }
}
