/* ==========================================================================
   buraksenguloglu.com — dark editorial design system
   ========================================================================== */

/* ------------------------------------------------------------- variables */
:root {
  --bg: #0a0a0b;
  --bg-soft: #131316;
  --surface: #1a1a1f;
  --surface-hover: #222228;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f4;
  --text-muted: #a3a3a0;
  --accent: #d4ff3f;
  --accent-dim: rgba(212, 255, 63, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1240px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------------------------------------------- fonts */
@font-face {
  font-family: "Elms Sans";
  src: url("/assets/fonts/elms-sans.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Elms Sans";
  src: url("/assets/fonts/elms-sans-italic.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }

/* Note: no CSS scroll-behavior here — Lenis provides smooth scrolling
   and the two conflict when combined. */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Elms Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container {
  width: min(var(--container), calc(100% - 3rem));
  margin-inline: auto;
}

::selection { background: var(--accent); color: #0a0a0b; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0c0c0e; }
.btn-primary:hover { background: #e2ff70; }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* -------------------------------------------------------------- sections */
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section:nth-of-type(even) { background: var(--bg-soft); }

.section-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  max-width: 20ch;
}
.section-title-sm { font-size: clamp(1.4rem, 2.6vw, 2rem); max-width: 34ch; }
.section-desc {
  color: var(--text-muted);
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-cta { margin-top: clamp(2rem, 4vw, 3rem); }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(28px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 10, 11, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.site-header.scrolled {
  background: rgba(10, 10, 11, 0.85);
  border-bottom-color: var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo-dot { color: var(--accent); }

.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  padding: 0.35rem 0;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 1.25rem; }
.lang-switcher { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; }
.lang-switcher a { color: var(--text-muted); transition: color 0.2s; }
.lang-switcher a:hover { color: var(--text); }
.lang-switcher a.active { color: var(--accent); }
.lang-sep { color: var(--border-strong); }

.nav-toggle { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Second video sits on top and crossfades in before the first one ends. */
.hero-video { transition: opacity 1s linear; }
#hero-video-b { opacity: 0; }
.hero-mask {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.72) 60%, var(--bg) 100%),
    radial-gradient(120% 90% at 20% 40%, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.85) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: var(--header-h);
}
.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}
.hero-desc {
  color: #d8d8d5;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-cta { margin-bottom: 2.4rem; }
.trust-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  max-width: 46ch;
}
.trust-stars { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; }
.trust-text { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.4rem;
  text-align: right;
}
.hero-right-title {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  max-width: 22ch;
  margin: 0;
  background: linear-gradient(100deg, #d4ff3f 0%, #7dffb0 45%, #5fb9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-rotator {
  position: relative;
  width: 100%;
  min-height: 6.5rem;
  text-align: right;
}
.hero-rotator-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: clamp(1.7rem, 3.4vw, 3.1rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), color 0.45s;
}
.hero-rotator-item.is-active {
  opacity: 1;
  transform: none;
  color: var(--text);
  -webkit-text-stroke: 0;
}
.hero-rotator-item.is-leaving {
  opacity: 0;
  transform: translateY(-24px);
}

/* -------------------------------------------------------- expertise strip */
/* Fixed-height compact band (~300px). On desktop, ScrollTrigger pins the
   section when it reaches the middle of the viewport and scroll progress
   slides the track horizontally (see main.js). Mobile swipes natively. */
.expertise {
  background: var(--bg);
  padding: 5rem 0;
}
.expertise-head { margin-bottom: 3rem; }
.expertise-head .section-desc { margin-top: 1rem; }
.expertise-sticky {
  overflow: hidden;
}
.expertise-track {
  display: flex;
  gap: 1.25rem;
  /* Start the first card at the content-area left edge (same inset the
     .container gets), not at the viewport edge. */
  padding-inline: calc((100vw - min(var(--container), 100vw - 3rem)) / 2);
  width: max-content;
  will-change: transform;
}
.expertise-widget {
  flex: 0 0 auto;
  width: min(23vw, 300px);
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.3s, background 0.3s;
}
.expertise-widget:hover { border-color: var(--accent); background: var(--surface-hover); }
.expertise-top { display: flex; align-items: flex-start; justify-content: space-between; }
.expertise-num { color: var(--accent); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; }
.expertise-icon svg {
  width: clamp(40px, 3.6vw, 54px);
  height: clamp(40px, 3.6vw, 54px);
  fill: var(--accent);
}
.expertise-widget h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); margin: 0; }

@media (max-width: 900px) {
  .expertise-track {
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .expertise-track::-webkit-scrollbar { display: none; }
  .expertise-widget { width: 72vw; scroll-snap-align: center; }
}

/* ------------------------------------------------------------- card grid */
.grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.card h3 { font-size: 1.3rem; }
.card-lead { color: var(--text); font-weight: 550; margin-bottom: 0.6rem; }
.card-text { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 0; }
.card-good {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.card-good strong { color: var(--accent); font-weight: 600; }

/* "Ways I Can Help" cards get individually colored titles. */
.ways-card h3 { color: var(--ways-accent, var(--accent)); }
.ways-card:hover { border-color: var(--ways-accent, var(--border-strong)); }
.ways-card .card-good strong { color: var(--ways-accent, var(--accent)); }

@media (max-width: 1024px) { .grid-3x2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3x2 { grid-template-columns: 1fr; }
  .ways-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    margin-inline: -1.5rem;
    padding: 0 1.5rem 1rem;
  }
  .ways-grid .card { flex: 0 0 82vw; scroll-snap-align: center; }
}

/* --------------------------------------------------------------- marquee */
.marquee {
  overflow: hidden;
  padding: 1.1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; align-items: center; gap: 1rem; padding-right: 1rem; }
.marquee-ltr .marquee-track { animation: marquee-scroll 48s linear infinite; }
.marquee-rtl .marquee-track { animation: marquee-scroll 40s linear infinite reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tool-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.3s, opacity 0.3s, border-color 0.3s;
}
.tool-chip:hover { filter: none; opacity: 1; border-color: var(--accent); }
.tool-chip img { height: 26px; width: auto; }
.tool-mono {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}
.tool-name { font-size: 0.95rem; font-weight: 550; }

.brand-chip {
  display: grid;
  place-items: center;
  padding: 0 1.6rem;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.3s, opacity 0.3s;
}
.brand-chip:hover { filter: none; opacity: 1; }
.brand-chip img { height: 44px; width: auto; max-width: 160px; object-fit: contain; }

/* ---------------------------------------------------------- featured work */
.featured-work { overflow: hidden; }
.work-carousel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* Overflow stays visible so the neighbouring (dimmed) cards peek out on
   both sides; the section itself clips them at the screen edges. */
.work-viewport { overflow: visible; flex: 1; }
.work-track {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 0;
  transition: transform 0.55s var(--ease);
}
.carousel-nav {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: border-color 0.25s, color 0.25s;
}
.carousel-nav:hover { border-color: var(--accent); color: var(--accent); }
.work-card {
  flex: 0 0 calc((100% - 2.5rem) / 3);
  height: 440px;
  perspective: 1400px;
  outline: none;
  opacity: 0.3;
  transform: scale(0.96);
  transition: opacity 0.4s, transform 0.4s var(--ease);
  pointer-events: none;
}
.work-card.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (max-width: 1024px) {
  .work-card { flex-basis: calc((100% - 1.25rem) / 2); }
}
@media (max-width: 640px) {
  .work-card { flex-basis: 100%; }
}
.work-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
}
.work-card:hover .work-card-inner,
.work-card:focus-visible .work-card-inner,
.work-card.is-flipped .work-card-inner { transform: rotateY(180deg); }

.work-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.work-front {
  background: linear-gradient(165deg, var(--surface) 0%, #141418 100%);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}
.work-front::before {
  content: "";
  position: absolute;
  top: -40%; right: -40%;
  width: 80%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent, var(--accent)) 0%, transparent 70%);
  opacity: 0.12;
}
.work-logo { height: 54px; width: auto; max-width: 70%; object-fit: contain; object-position: left; margin-bottom: 1.4rem; }
.work-logo-placeholder {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--card-accent, var(--accent));
  font-size: 1.6rem;
  font-weight: 750;
  margin-bottom: 1.4rem;
}
.work-front h3 { font-size: 1.45rem; }
.work-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.work-short { color: var(--text-muted); font-size: 0.95rem; margin-top: auto; }

.work-back {
  transform: rotateY(180deg);
  background-color: var(--surface);
}
/* Blurred project photo behind the flipped card's text. */
.work-back-photo {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(4px) saturate(0.9);
}
.work-back-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.93) 75%);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
}
.work-back-overlay h3 { font-size: 1.3rem; color: var(--accent); }
.work-back-overlay p { color: #e4e4e1; font-size: 0.88rem; line-height: 1.55; margin: 0; }

/* ---------------------------------------------------------------- journey */
.timeline {
  position: relative;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--accent) 0%, var(--border-strong) 30%, var(--border) 100%);
}
.timeline-item { position: relative; width: 50%; }
.timeline-left { padding-right: clamp(2rem, 4vw, 3.5rem); }
.timeline-right { margin-left: 50%; padding-left: clamp(2rem, 4vw, 3.5rem); }
.timeline-dot {
  position: absolute;
  top: 2.2rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  z-index: 1;
}
.timeline-left .timeline-dot { right: -7px; }
.timeline-right .timeline-dot { left: -7px; }
.timeline-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.timeline-years {
  color: var(--accent);
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}
.timeline-card h3 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.timeline-company { color: var(--text-muted); font-weight: 550; margin-bottom: 1rem; }
.timeline-logo {
  height: 44px; width: auto; max-width: 120px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .timeline::before { left: 8px; transform: none; }
  .timeline-item, .timeline-right { width: auto; margin-left: 0; padding: 0 0 0 2.4rem; }
  .timeline-left .timeline-dot, .timeline-right .timeline-dot { left: 1px; right: auto; }
}

/* --------------------------------------------------------- cert carousel */
.cert-carousel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(1400px, 100%);
  margin-inline: auto;
  padding: 0 0.75rem;
}
.cert-viewport { overflow: hidden; flex: 1; }
.cert-track {
  display: flex;
  gap: 1.25rem;
  transition: transform 0.55s var(--ease);
  padding: 0.5rem 0;
}
.cert-card {
  flex: 0 0 calc((100% - 2.5rem) / 3);
  margin: 0;
  cursor: pointer;
  opacity: 0.35;
  transform: scale(0.96);
  transition: opacity 0.4s, transform 0.4s var(--ease);
  outline: none;
}
.cert-card.is-visible { opacity: 1; transform: none; }
.cert-card img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  aspect-ratio: 800 / 566;
  object-fit: cover;
  transition: border-color 0.3s;
}
.cert-card.is-visible:hover img,
.cert-card.is-visible:focus-visible img { border-color: var(--accent); }
.cert-card figcaption { padding-top: 0.8rem; }
.cert-issuer { display: block; color: var(--accent); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.cert-title { display: block; font-weight: 600; }

.cert-nav {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.cert-nav:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1024px) {
  .cert-card { flex-basis: calc((100% - 1.25rem) / 2); }
}
@media (max-width: 640px) {
  .cert-card { flex-basis: 100%; }
}

/* --------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 6, 0.9);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(880px, 100%); }
.lightbox img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}
.lightbox figcaption { text-align: center; padding-top: 1rem; color: var(--text-muted); }
.lightbox-close {
  position: absolute;
  top: 1.2rem; right: 1.6rem;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--text); }

/* ------------------------------------------------------------ latest notes */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.note-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.note-cover {
  height: 130px;
  background:
    radial-gradient(140% 120% at 85% 0%, var(--accent-dim) 0%, transparent 55%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.note-card:nth-child(2) .note-cover {
  background:
    radial-gradient(140% 120% at 10% 0%, rgba(95,185,255,0.12) 0%, transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px),
    var(--bg-soft);
}
.note-card:nth-child(3) .note-cover {
  background:
    radial-gradient(140% 120% at 50% 0%, rgba(185,143,255,0.12) 0%, transparent 55%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px),
    var(--bg-soft);
}
.note-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.note-category {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.7rem;
}
.note-body h3 { font-size: 1.25rem; }
.note-body p { color: var(--text-muted); font-size: 0.95rem; flex: 1; }
.note-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 1024px) { .notes-grid { grid-template-columns: 1fr; max-width: 560px; } }

/* ---------------------------------------------------------------- final CTA */
.final-cta { text-align: center; }
.final-cta .section-title, .final-cta .section-desc { margin-inline: auto; }
.cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }

/* -------------------------------------------------- plain (non-link) emails */
.email-plain { color: var(--text-muted); user-select: all; }
.email-chip { cursor: text; user-select: all; }
.email-chip:hover { border-color: var(--border); color: var(--text); transform: none; }

/* ------------------------------------------------------- icon buttons/links */
.btn-icon { display: inline-flex; align-items: center; gap: 0.55rem; }
.btn-svg { display: inline-flex; }
.btn-svg svg { width: 1em; height: 1em; fill: currentColor; }
.footer-social { display: inline-flex; align-items: center; gap: 0.45rem; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand p { color: var(--text-muted); max-width: 34ch; margin-top: 1rem; font-size: 0.95rem; }
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ------------------------------------------------------------ inner pages */
.page-hero {
  padding: calc(var(--header-h) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(3rem, 6vw, 5rem);
}
.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.page-hero .lead { color: var(--text-muted); font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 60ch; }

.coming-soon {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}
.coming-soon h2 { font-size: 1.6rem; }
.coming-soon p { color: var(--text-muted); margin-bottom: 1.8rem; }

/* -------------------------------------------------------------- about page */
.about-hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about-hero-photo {
  position: relative;
  max-width: 420px;
  justify-self: end;
}
.about-hero-photo::before {
  content: "";
  position: absolute;
  inset: auto -14px -14px auto;
  width: 70%;
  height: 70%;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  opacity: 0.55;
  z-index: 0;
}
.about-hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  filter: grayscale(18%) contrast(1.04);
}
.story-paragraphs {
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.story-paragraphs p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.edu-degree {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.7rem;
}
.edu-card h3 { font-size: 1.3rem; margin-bottom: 0.35rem; }

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
}
.skill-group h3 { font-size: 1.05rem; margin-bottom: 1rem; color: var(--accent); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s;
}
.skill-chip:hover { border-color: var(--accent); color: var(--text); }

@media (max-width: 900px) {
  .about-hero-inner { grid-template-columns: 1fr; }
  .about-hero-photo { justify-self: start; max-width: 320px; }
  .edu-grid, .skill-groups { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- services page */
.services-list .container {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.service-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 3rem);
  transition: border-color 0.3s;
}
.service-block:hover { border-color: var(--border-strong); }
.service-block-flip { grid-template-columns: 1fr 180px; }
.service-block-flip .service-side { order: 2; }
.service-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}
.service-block-flip .service-side { align-items: flex-end; text-align: right; }
.service-num {
  color: var(--service-accent, var(--accent));
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
}
.service-icon svg {
  width: clamp(52px, 5vw, 72px);
  height: clamp(52px, 5vw, 72px);
  fill: var(--service-accent, var(--accent));
}
.service-body h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--service-accent, var(--text));
  margin-bottom: 0.4rem;
}
.service-lead { font-weight: 600; margin-bottom: 0.9rem; }
.service-text { color: var(--text-muted); margin-bottom: 1.4rem; max-width: 72ch; }
.service-includes h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.service-includes ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1.5rem;
}
.service-includes li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.service-includes li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--service-accent, var(--accent));
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.process-step { position: relative; }
.process-num {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.process-step h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

@media (max-width: 900px) {
  .service-block, .service-block-flip { grid-template-columns: 1fr; }
  .service-block-flip .service-side { order: 0; align-items: flex-start; text-align: left; }
  .service-side { flex-direction: row; align-items: center; }
  .service-includes ul { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- projects page */
.projects-list .container {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}
.project-case {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: center;
}
.project-case-flip .project-visual { order: 2; }
.project-visual {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--case-accent) 14%, transparent) 0%, transparent 60%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 14px),
    var(--surface);
  padding: clamp(1.5rem, 3vw, 3rem);
  transition: border-color 0.3s;
}
.project-case:hover .project-visual { border-color: color-mix(in srgb, var(--case-accent) 55%, var(--border)); }
/* Photo layer: slightly blurred, oversized to hide blur edge bleed. */
.project-photo {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: blur(5px) saturate(0.9);
  transform: scale(1.03);
  transition: filter 0.4s var(--ease), transform 0.4s var(--ease);
}
.project-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,6,0.45) 0%, rgba(5,5,6,0.72) 100%),
    radial-gradient(90% 90% at 50% 50%, rgba(5,5,6,0.25) 0%, rgba(5,5,6,0.7) 100%);
}
.project-case:hover .project-photo { filter: blur(3px) saturate(1); transform: scale(1.06); }
.project-logo {
  position: relative;
  z-index: 1;
  max-width: min(70%, 280px);
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.55));
}
.project-body h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0.7rem 0 1rem;
}
.project-meta {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin: 0 0 1.2rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.project-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.project-meta dd { margin: 0; font-weight: 600; font-size: 0.95rem; }
.project-text { color: var(--text-muted); margin-bottom: 1rem; }
.project-highlights {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.project-highlights li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.95rem;
}
.project-highlights li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--case-accent, var(--accent));
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .project-case, .project-case-flip { grid-template-columns: 1fr; }
  .project-case-flip .project-visual { order: 0; }
  .project-visual { min-height: 200px; }
}

/* ------------------------------------------------------- certificates page */
.cert-hint { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.6rem; }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
/* Reset carousel-specific dimming/sizing when cards live in a grid. */
.cert-grid .cert-card {
  flex: none;
  opacity: 1;
  transform: none;
}
.cert-grid .cert-card:hover img,
.cert-grid .cert-card:focus-visible img { border-color: var(--accent); }
@media (max-width: 1024px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .cert-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- blog pages */
.blog-grid .note-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.blog-grid .note-body h2 { font-size: 1.25rem; }
.note-more {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  padding-top: 0.9rem;
}
.post-container { max-width: 800px; margin-inline: auto; }
.post-back {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.6rem;
  transition: color 0.2s;
}
.post-back:hover { color: var(--accent); }
.post-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
.post-meta { border-top: none; padding-top: 1.2rem; }
.post-section { padding-top: 0; }
.post-body {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}
.post-body p { margin-bottom: 1.2rem; }
.post-body h2 {
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin: 2.2rem 0 0.9rem;
}
.post-body h3 { color: var(--text); font-size: 1.15rem; margin: 1.8rem 0 0.7rem; }
.post-body ul, .post-body ol { margin: 0 0 1.2rem 1.3rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body strong { color: var(--text); }
.post-body a { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------ contact form */
.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.45rem; }
.form-field label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.form-field input, .form-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.25s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { min-height: 160px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-note { color: var(--text-muted); font-size: 0.9rem; }
.form-alert {
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-weight: 550;
}
.form-alert.ok { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(212,255,63,0.4); }
.form-alert.err { background: rgba(255,95,79,0.1); color: #ff8f82; border: 1px solid rgba(255,95,79,0.35); }

@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- 404 */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-page h1 { font-size: clamp(3rem, 8vw, 6rem); }

/* --------------------------------------------------------------- mobile nav */
@media (max-width: 1100px) {
  .site-nav ul { gap: 1.15rem; }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #0a0a0b;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .site-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.8rem 1.5rem 1.4rem; }
  .site-nav a { display: block; padding: 0.8rem 0; font-size: 1.1rem; }
  .site-nav a.active::after { display: none; }
  .site-nav a.active { color: var(--accent); }

  .hero-inner { grid-template-columns: 1fr; padding-top: calc(var(--header-h) + 2rem); }
  .hero-right { align-items: flex-start; text-align: left; }
  .hero-rotator { text-align: left; min-height: 5rem; }
  .hero-rotator-item { justify-content: flex-start; }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
