/* ===================================================================
   Driswin Kumar — Portfolio
   =================================================================== */

:root {
  --bg: #070A13;
  --bg-alt: #0D1220;
  --surface: #0F1526;
  --accent: #FF7A45;
  --accent-2: #FF9C6B;
  --highlight: #FFC89B;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --max-width: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3,
.stat-value,
.brand-name,
.project-name {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- texture / cursor ---------- */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 998;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--highlight);
  display: none;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--border-strong);
  transition: transform 0.15s var(--ease), border-color 0.2s ease, width 0.2s ease, height 0.2s ease;
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring { display: block; }
}
.cursor-ring.is-active {
  border-color: var(--highlight);
  width: 52px; height: 52px;
}

/* ---------- layout helpers ---------- */

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 128px 0;
  position: relative;
}
.section-alt { background: var(--bg-alt); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--highlight);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--highlight);
  display: inline-block;
}

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 640px;
}

.section-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 380px;
  line-height: 1.6;
}

.accent-text {
  background: linear-gradient(100deg, var(--accent-2), var(--highlight) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span { transform: translate(2px, -2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-primary:hover {
  box-shadow: 0 8px 24px -6px rgba(255, 122, 69, 0.55);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-outline:hover {
  border-color: var(--highlight);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  font-size: 13.5px;
}
.btn-ghost:hover { border-color: var(--highlight); }

.btn-sm { padding: 10px 18px; font-size: 13.5px; }

/* ===================== HEADER ===================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.scrolled {
  background: rgba(7, 10, 19, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.primary-nav ul { display: flex; gap: 34px; }
.nav-link {
  position: relative;
  font-size: 14.5px;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 1px;
  background: var(--highlight);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-cta { flex-shrink: 0; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  width: 20px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(320px, 84vw);
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 499;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 28px; }
.mobile-link {
  font-size: 24px;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.mobile-cta { justify-content: center; }

/* ===================== HERO ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, black 10%, transparent 75%);
  opacity: 0.5;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.glow-a {
  width: 480px; height: 480px;
  background: var(--accent);
  top: -120px; right: -80px;
}
.glow-b {
  width: 360px; height: 360px;
  background: var(--highlight);
  bottom: -140px; left: 10%;
  opacity: 0.18;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-size: clamp(36px, 4.8vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 24px;
  max-width: 600px;
}

.hero-sub {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }

.hero-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 3px rgba(255, 200, 155, 0.18);
  flex-shrink: 0;
}

/* ---------- hero visual: big photo + network backdrop ---------- */

.hero-visual {
  position: relative;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0.65;
}

.orbit {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}
.orbit-2 { stroke-dasharray: 2 6; }

#nodeGroup circle.node { fill: url(#nodeGlow); }
#nodeGroup circle.node-core { fill: var(--highlight); }
#linkGroup line {
  stroke: url(#lineGrad);
  stroke-width: 1;
  opacity: 0.4;
}

.hero-photo {
  position: relative;
  width: min(420px, 88%);
  aspect-ratio: 3 / 3.7;
  z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 44%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 44%, #000 60%, transparent 100%);
}
.hero-photo img,
.hero-photo-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 16%;
}
.hero-photo img {
  background: var(--bg-alt);
  filter: grayscale(12%) contrast(104%) saturate(98%);
}
.hero-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
}
.hero-photo-fallback span {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--accent-2), var(--highlight));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 8px;
  background: var(--highlight);
  border-radius: 3px;
  transform: translateX(-50%);
  animation: scrollcue 2s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; top: 7px; }
  70% { opacity: 0; top: 18px; }
  100% { opacity: 0; top: 18px; }
}

/* ===================== ABOUT ===================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
}

.about-body p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  max-width: 620px;
  margin-bottom: 18px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 36px 0;
}
.stat {
  background: var(--surface);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.3s ease;
}
.stat:hover { background: rgba(255, 122, 69, 0.08); }
.stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 12.5px;
  color: var(--muted);
}

.about-meta {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14.5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.meta-row span:first-child { color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; }
.meta-row span:last-child { text-align: right; font-weight: 500; }

/* ===================== SKILLS ===================== */

.skills-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 40px;
}
.skill-cat h3 {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13.5px;
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.chip:hover {
  border-color: var(--highlight);
  background: rgba(255, 156, 107, 0.1);
  color: var(--highlight);
  transform: translateY(-3px);
}

/* ===================== PROJECTS ===================== */

.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

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

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.35s var(--ease), box-shadow 0.35s ease;
}
.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 20px 60px -30px rgba(255, 122, 69, 0.45);
}
.project-flagship {
  border-color: rgba(255, 156, 107, 0.35);
  background: linear-gradient(180deg, rgba(255, 122, 69, 0.06), var(--surface) 40%);
}

.project-visual {
  position: relative;
  height: 230px;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.browser-bar {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}
.browser-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}
.browser-bar span:first-child { background: var(--highlight); opacity: 0.6; }

.project-visual img {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-visual img { transform: scale(1.03); }

.screenshot-placeholder {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 122, 69, 0.1), transparent 60%),
    var(--bg-alt);
}
.screenshot-placeholder svg { width: 34px; height: 34px; opacity: 0.4; }
.screenshot-placeholder span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.project-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--highlight);
  background: rgba(7, 10, 19, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 200, 155, 0.35);
  padding: 4px 10px;
  border-radius: 100px;
}

.project-body {
  padding: 28px 30px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.project-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.68;
  margin-bottom: 14px;
}
.project-flow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--highlight);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.project-desc:last-of-type { margin-bottom: 20px; }
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.tech-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--highlight);
  background: var(--bg);
  border: 1px solid var(--border);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease, transform 0.25s var(--ease);
}
.tech-badge:hover { border-color: var(--highlight); transform: translateY(-2px); }

.project-links { display: flex; gap: 20px; margin-top: auto; flex-wrap: wrap; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s ease, gap 0.25s ease;
}
.project-link:hover { color: var(--highlight); gap: 11px; }
.link-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ===================== EXPLORING ===================== */

.exploring { position: relative; overflow: hidden; }
.explore-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.explore-inner { position: relative; z-index: 1; text-align: center; }
.explore-inner .section-title { margin: 0 auto 40px; }
.explore-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 48px;
}
.explore-tags span {
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(13, 18, 32, 0.6);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.explore-tags span:hover { border-color: var(--highlight); color: var(--highlight); }
.explore-line {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ===================== JOURNEY ===================== */

.timeline {
  margin-top: 48px;
  max-width: 700px;
  position: relative;
  padding-left: 30px;
  border-left: 1px solid var(--border);
}
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -34.5px;
  top: 3px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 0 5px var(--border);
}
.timeline-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.timeline-content h3 { font-size: 19px; font-weight: 700; }
.timeline-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bg);
  background: var(--highlight);
  padding: 3px 9px;
  border-radius: 100px;
}
.timeline-content p { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 520px; margin-top: 6px; }

/* ===================== CONTACT ===================== */

.contact { text-align: center; padding-top: 100px; padding-bottom: 140px; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact .eyebrow { justify-content: center; }
.contact .section-title { max-width: 640px; }
.contact-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 460px;
  margin: 20px 0 40px;
  line-height: 1.65;
}
.contact-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.contact-direct {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: center;
}
.contact-direct a:hover { color: var(--highlight); }

/* ===================== FOOTER ===================== */

.site-footer { border-top: 1px solid var(--border); padding: 44px 0; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.brand-name { font-weight: 700; }
.brand-role { color: var(--muted); font-size: 13.5px; }
.footer-links { display: flex; gap: 24px; font-size: 14px; }
.footer-links a:hover { color: var(--highlight); }
.footer-bottom {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===================== BACK TO TOP ===================== */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--highlight); color: var(--highlight); }

/* ===================== SCROLL REVEAL ===================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

@media (max-width: 1080px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }

  /* keep two columns: content left, photo right */
  .hero-inner { grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
  .hero-visual { height: auto; justify-content: flex-end; }
  .hero-photo { width: 100%; max-width: 320px; margin: 0; }
  .hero-svg { display: none; }
}

@media (max-width: 900px) {
  .primary-nav, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .header-inner { justify-content: flex-end; }
  .project-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .hero-title { font-size: clamp(26px, 5vw, 40px); }
  .hero-sub { font-size: 15px; margin-bottom: 24px; }
}

@media (max-width: 640px) {
  /* tighter spacing for every section */
  .section { padding: 56px 0; }
  .section-inner { padding: 0 20px; }
  .header-inner { padding: 14px 20px; }
  .projects-head { margin-bottom: 32px; }
  .skills-grid { margin-top: 32px; gap: 28px; }
  .contact { padding-top: 56px; padding-bottom: 72px; }

  /* hero: no full-screen height, small top/bottom padding */
  .hero {
    min-height: auto;
    padding: 78px 0 36px;
    align-items: flex-start;
  }
  .scroll-cue { display: none; }

  /* text left, photo right (photo bleeds to the edge) */
  .hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 0;
    padding: 0 0 0 20px;
    align-items: start;
  }
  .hero-copy { position: relative; z-index: 2; }

  .hero-title { font-size: 25px; line-height: 1.18; margin-bottom: 12px; }
  .hero-sub { font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
  .eyebrow { font-size: 11.5px; margin-bottom: 10px; }
  .hero-actions { gap: 10px; margin-bottom: 16px; }
  .hero-actions .btn { padding: 10px 18px; font-size: 13px; }
  .hero-tag { font-size: 11px; align-items: flex-start; }

  /* photo sits near the top, next to the title */
  .hero-visual { height: auto; justify-content: flex-end; overflow: visible; margin-top: 36px; }
  .hero-photo {
    width: 135%;
    max-width: none;
    margin: 0;
    aspect-ratio: 3 / 4;
    z-index: 1;
    -webkit-mask-image: radial-gradient(ellipse 62% 58% at 55% 46%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 62% 58% at 55% 46%, #000 62%, transparent 100%);
  }
  .hero-photo-fallback span { font-size: 34px; }

  .project-body { padding: 24px 22px; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); margin: 28px 0; }
  .meta-row { flex-direction: column; gap: 4px; }
  .meta-row span:last-child { text-align: left; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .cursor-dot, .cursor-ring { display: none; }
}