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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text: #f0f0f0;
  --text-muted: #999;
  --text-subtle: #777;
  --accent: #8b7cf8;
  --accent-light: #c084fc;
  --accent-dim: rgba(139, 124, 248, 0.18);
  --accent-glow: rgba(139, 124, 248, 0.15);
  --accent-border: rgba(139, 124, 248, 0.3);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-height: 68px;
  --max: 1080px;
  --ease: 0.22s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle purple ambient glow top-right of page */
body::before {
  content: '';
  position: fixed;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(139,124,248,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(192,132,252,0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Make sure content sits above the body glows */
nav, .page, footer { position: relative; z-index: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(139,124,248,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,124,248,0.5); }

/* Text selection */
::selection { background: rgba(139,124,248,0.25); color: var(--text); }

a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; }

/* ─── BRAND LOGO ─── */
.nav-logo-img {
  width: 28px; height: 28px;
  border-radius: 50%; object-fit: cover;
  flex-shrink: 0; display: inline-block;
  vertical-align: middle; margin-right: 8px;
}
.footer-logo {
  width: 22px; height: 22px;
  border-radius: 50%; object-fit: cover;
  display: inline-block; vertical-align: middle;
  margin-right: 6px; opacity: 0.85;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Gradient bottom border — replaces the flat border */
nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(139,124,248,0.35) 25%,
    rgba(139,124,248,0.35) 75%,
    transparent 100%
  );
}

.nav-logo {
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 6px;
}
.nav-logo .sep { color: var(--text-subtle); }
.nav-logo .role { color: var(--text-muted); font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  font-size: 14px; color: var(--text-muted);
  padding: 6px 14px; border-radius: 100px;
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }

@property --nav-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes navBorderSpin {
  to { --nav-angle: 360deg; }
}
.nav-cta {
  border: 1.5px solid transparent !important;
  color: var(--text) !important;
  background:
    linear-gradient(rgba(10,10,10,0.92), rgba(10,10,10,0.92)) padding-box,
    conic-gradient(from var(--nav-angle), transparent 0deg, var(--accent) 60deg, var(--accent-light) 100deg, transparent 160deg) border-box !important;
  animation: navBorderSpin 3s linear infinite;
}
.nav-cta:hover {
  background:
    linear-gradient(rgba(139,124,248,0.06), rgba(139,124,248,0.06)) padding-box,
    conic-gradient(from var(--nav-angle), transparent 0deg, var(--accent) 60deg, var(--accent-light) 100deg, transparent 160deg) border-box !important;
}

/* ─── PAGE WRAPPER ─── */
.page { padding-top: var(--nav-height); flex: 1; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 48px; }

/* ─── HERO (Homepage) ─── */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex; align-items: center;
  padding: 80px 0 60px;
  position: relative;
}

/* Decorative accent orb behind hero photo */
.hero::before {
  content: '';
  position: absolute;
  top: 10%; right: -60px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,124,248,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  display: grid; grid-template-columns: 1fr 2fr;
  align-items: center; gap: 40px;
  position: relative; z-index: 1;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 28px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent); }
  50%       { opacity: 0.6; box-shadow: 0 0 12px var(--accent); }
}

.hero h1 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 20px;
}

/* Gradient text on the italic/accent part */
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 36px; max-width: 440px;
}

.hero-actions { display: flex; gap: 12px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; padding: 12px 24px;
  border-radius: 100px; cursor: pointer;
  transition: all var(--ease); border: none;
  font-family: var(--font);
}

/* Purple primary button */
.btn-primary {
  background: #7c6ef5;
  color: #fff;
  box-shadow: 0 0 0 rgba(139,124,248,0);
}
.btn-primary:hover {
  background: #6d60e8;
  box-shadow: 0 0 24px rgba(139,124,248,0.3), 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

/* Hero photo frame — purple glow */
.hero-visual {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--accent-border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    20px 0 60px rgba(139,124,248,0.14),
    0 0 40px rgba(139,124,248,0.07),
    0 20px 60px rgba(0,0,0,0.4);
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 30%, rgba(139,124,248,0.07) 100%);
  pointer-events: none;
  z-index: 1;
  animation: photoGlow 4s ease-in-out infinite 3.8s;
  opacity: 0.4;
}
@keyframes photoGlow {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

.photo-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-subtle); font-size: 13px;
}
.photo-placeholder-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px dashed var(--text-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}

/* ─── HERO GEO SHAPE ─── */
.hero-geo {
  position: absolute;
  right: -370px;
  top: calc(50% - 345px);
  width: 580px; height: 690px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(139,124,248,0.35));
  will-change: transform, opacity;
  animation:
    heroGeoFadeIn 2.4s ease forwards 0.3s,
    heroGeoFloat 9s ease-in-out infinite 3.5s;
}
.hero-geo-shape {
  stroke-dasharray: 2045;
  stroke-dashoffset: 2045;
  stroke-opacity: 0.55;
  fill-opacity: 0;
  animation:
    heroGeoDraw 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s,
    heroGeoFill  4.8s ease-out forwards 0.3s,
    heroGeoGlow  4s ease-in-out infinite 3.8s;
}
@keyframes heroGeoFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroGeoDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes heroGeoFill {
  from { fill-opacity: 0; }
  to   { fill-opacity: 0.03; }
}

@keyframes heroGeoFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  35%       { transform: translateY(-14px) rotate(0.6deg); }
  70%       { transform: translateY(8px) rotate(-0.4deg); }
}
@keyframes heroGeoGlow {
  0%, 100% { stroke-opacity: 0.55; }
  50%       { stroke-opacity: 0.78; }
}
@media (max-width: 900px) { .hero-geo { display: none; } }

/* ─── SECTION LABELS ─── */
.section-label {
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 40px;
  display: flex; align-items: center; gap: 16px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--accent-border), transparent);
}

/* ─── WORK SECTION ─── */
.work-section { padding: 80px 0 120px; }

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.project-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-5px);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.5),
    0 0 0 1px rgba(139,124,248,0.08),
    0 0 30px rgba(139,124,248,0.08);
}
.project-card.wip { opacity: 0.5; cursor: default; }
.project-card.wip:hover { transform: none; box-shadow: none; }

.card-image {
  aspect-ratio: 16/10;
  background: var(--surface-2);
  overflow: hidden; position: relative;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: transform 0.5s ease, opacity 0.4s ease; }
.project-card:hover .card-image img { transform: scale(1.04); opacity: 1; }

.card-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(139,124,248,0.75); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 4px 11px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(139,124,248,0.25);
  backdrop-filter: blur(6px);
}

.img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle); font-size: 13px;
  background: linear-gradient(135deg, #141414 0%, #1e1e1e 100%);
}

.card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }

.card-tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}

.card-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.card-body p { font-size: 14px; color: var(--text-muted); line-height: 1.6; flex: 1; }

.card-arrow {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  margin-top: 20px;
  transition: color var(--ease), gap var(--ease);
}
.project-card:hover .card-arrow { color: var(--accent); gap: 10px; }
.card-arrow-icon { font-size: 16px; }

.wip-badge {
  display: inline-block; font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-subtle);
  padding: 4px 10px; border-radius: 100px; margin-top: 16px;
}

/* ─── ABOUT TEASER ─── */
.about-teaser {
  border-top: 1px solid var(--border);
  padding: 80px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  position: relative;
}
/* Subtle accent left-edge glow */
.about-teaser::before {
  content: '';
  position: absolute;
  left: -48px; top: 80px;
  width: 3px; height: 120px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  border-radius: 3px;
  opacity: 0.5;
}
.about-teaser h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.about-teaser p { font-size: 16px; color: var(--text-muted); line-height: 1.7; }
.about-teaser .links { display: flex; gap: 16px; margin-top: 28px; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 100%;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,124,248,0.2), transparent);
}
.footer-left { font-size: 13px; color: var(--text-subtle); }
.footer-right { display: flex; gap: 24px; }
.footer-right a { font-size: 13px; color: var(--text-subtle); transition: color var(--ease); }
.footer-right a:hover { color: var(--accent); }

/* ─── PAGE HEADERS ─── */
.page-header { padding: 80px 0 60px; }
.page-header .breadcrumb {
  font-size: 13px; color: var(--text-subtle); margin-bottom: 24px;
  display: flex; align-items: center; gap: 8px;
}
.page-header .breadcrumb a { color: var(--text-subtle); transition: color var(--ease); }
.page-header .breadcrumb a:hover { color: var(--accent); }
.page-header h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; }
.page-header p { font-size: 17px; color: var(--text-muted); max-width: 600px; line-height: 1.7; }

/* ─── ABOUT PAGE ─── */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; padding: 40px 0 100px; align-items: start; }

.about-photo {
  aspect-ratio: 3/4;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(139,124,248,0.08);
}

.about-content h2 {
  font-size: 22px; font-weight: 600; margin-bottom: 14px; margin-top: 40px;
  display: flex; align-items: center; gap: 10px;
}
.about-content h2::before {
  content: '';
  width: 3px; height: 18px;
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  flex-shrink: 0;
}
.about-content h2:first-child { margin-top: 0; }
.about-content p { font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 14px; }

.skills-list {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.skill-tag {
  font-size: 13px; padding: 6px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.skill-tag:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}

.availability-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 100px; margin-top: 8px;
}
.availability-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(74,222,128,0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 12px rgba(74,222,128,0.8); }
}

/* ─── CONTACT PAGE ─── */
.contact-section { padding: 40px 0 100px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-info h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.contact-info p { font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 32px; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}
.contact-link:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  box-shadow: 0 0 20px rgba(139,124,248,0.08);
}
.contact-link-left { display: flex; align-items: center; gap: 14px; }
.contact-link-icon { font-size: 20px; }
.contact-link-label { font-size: 13px; color: var(--text-subtle); margin-bottom: 2px; }
.contact-link-value { font-size: 15px; font-weight: 500; }
.contact-link-arrow { color: var(--text-subtle); font-size: 18px; transition: transform var(--ease), color var(--ease); }
.contact-link:hover .contact-link-arrow { transform: translateX(3px); color: var(--accent); }

.contact-note {
  padding: 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
}
.contact-note strong { color: var(--accent); }
.contact-link-label { color: var(--accent) !important; }

/* ─── PROJECT / CASE STUDY PAGE ─── */
.project-hero {
  aspect-ratio: 16/7;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 64px;
  position: relative;
  box-shadow: 0 0 40px rgba(139,124,248,0.06), 0 20px 60px rgba(0,0,0,0.4);
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.project-hero .img-placeholder { height: 100%; }

.project-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 64px;
}
.meta-item {
  background: var(--surface); padding: 20px 24px;
  transition: background var(--ease);
}
.meta-item:hover { background: var(--surface-2); }
.meta-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px; }
.meta-value { font-size: 15px; font-weight: 500; }

.project-body { max-width: none; }
.project-body h2 {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin: 52px 0 14px; max-width: 600px;
}
.project-body h2:first-child { margin-top: 0; }
.project-body p { font-size: 16px; color: var(--text-muted); line-height: 1.85; margin-bottom: 14px; max-width: 600px; }
.project-body ul { list-style: none; padding: 0; margin-bottom: 18px; max-width: 600px; }

/* ── GLOBAL SECTION LABEL ── */
.detail-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px;
}

/* ── DETAIL GRID (image + text side by side) ── */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center; margin: 32px 0;
}
.detail-grid img { width: 100%; border-radius: var(--radius); display: block; }
.detail-grid-text h3 {
  font-size: 22px; font-weight: 700; color: var(--text);
  margin: 0 0 14px; line-height: 1.25; letter-spacing: -0.01em;
}
.detail-grid-text p { font-size: 15px; color: var(--text-muted); line-height: 1.75; margin-bottom: 12px; }
@media (max-width: 800px) {
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
}
.project-body ul li { font-size: 16px; color: var(--text-muted); padding: 4px 0 4px 20px; position: relative; line-height: 1.7; }
.project-body ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

.project-image-block {
  margin: 40px 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.3s ease;
}
.project-image-block:hover { border-color: var(--accent-border); }
.project-image-block img { width: 100%; }
.project-image-block .img-placeholder { aspect-ratio: 16/9; }
.image-caption {
  font-size: 14px; color: var(--text-subtle);
  padding: 14px 20px; border-top: 1px solid var(--border);
}

.project-nav {
  border-top: 1px solid var(--border);
  padding: 64px 0;
  display: flex; justify-content: center; align-items: center;
}
.project-nav .btn {
  font-size: 15px; padding: 14px 32px;
  display: inline-flex; align-items: center; gap: 10px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .container { padding: 0 24px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .about-teaser { grid-template-columns: 1fr; gap: 32px; }
  .about-teaser::before { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 16/9; max-width: 400px; }
  .contact-grid { grid-template-columns: 1fr; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  footer { flex-direction: column; gap: 16px; padding: 24px; }
}

@media (max-width: 600px) {
  nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .nav-links .nav-hide { display: none; }
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* ─── PAGE LOAD ─── */
.hero-text { animation: heroFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-visual { animation: heroFade 0.7s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes heroFade {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ─── LIGHTBOX ─── */
#lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
  padding: 24px;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 0 1px var(--accent-border);
}
#lightbox-close {
  position: fixed; top: 22px; right: 26px;
  font-size: 32px; color: rgba(255,255,255,0.5);
  cursor: pointer; line-height: 1;
  transition: color 0.15s ease; z-index: 10000;
  background: none; border: none; font-family: inherit;
}
#lightbox-close:hover { color: var(--accent); }

/* ─── COMPONENT GALLERY ─── */
.component-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 36px 0 48px;
  align-items: start;
}
.gallery-item {
  background: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.gallery-item:hover { transform: translateY(-3px); opacity: 0.9; }
.gallery-item img {
  width: 100%; display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease;
}
.gallery-item:hover img { border-color: var(--accent-border); }
.gallery-item .gallery-label {
  font-size: 10px; color: var(--text-subtle);
  padding: 6px 2px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* gallery span helpers */
.gc-wide { grid-column: span 2; }
.gc-full { grid-column: 1 / -1; }

/* ─── MAGNIFIER ─── */
#magnifier {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.18s ease;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(139, 124, 248, 0.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.92), 0 0 20px rgba(139,124,248,0.2);
  background-repeat: no-repeat;
  background-color: #0a0a0a;
}
#magnifier.visible { opacity: 1; }

/* ─── TWO-IMAGE ROW ─── */
.image-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 40px 0;
}
.image-row .project-image-block { margin: 0; }

.comparison-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin: 40px 0;
}
.comparison-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.comparison-item img {
  width: 100%; max-height: 480px;
  object-fit: contain; display: block;
}
.comparison-item .image-caption {
  padding: 12px 16px; border-top: 1px solid var(--border);
}

/* ─── ABOUT PHOTO (real image) ─── */
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ─── LIGHTBOX TRIGGERS ────────────────────────────────────────────────────── */
img.lb-trigger {
  cursor: zoom-in;
  transition: filter 0.2s ease, transform 0.2s ease;
}
img.lb-trigger:hover {
  filter: brightness(1.06);
  transform: scale(1.005);
}

/* ─── NO TEXT CURSOR ON DECORATIVE ELEMENTS ───────────────────────────────── */
.skill-tag, .availability-badge, .contact-note,
.mood-card, .feature-card, .wip-badge, .card-badge,
.hero-tag, .section-label, .card-tag, .meta-label, .meta-value,
.comparison-label, .image-caption, .mood-name, .mood-desc,
.feature-title, .feature-desc {
  cursor: default;
  user-select: none;
}

/* ─── FOCUS STYLES (keyboard navigation) ──────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── BACK TO TOP ──────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: none;
  color: #fff; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(139,124,248,0.4), 0 2px 8px rgba(0,0,0,0.4);
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(139,124,248,0.55), 0 4px 12px rgba(0,0,0,0.4);
}

/* ─── LIKE POPUP ─────────────────────────────────────────────────────────── */
@property --like-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes likeBorderSpin { to { --like-angle: 360deg; } }

.like-popup {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 88; border-radius: 50px;
  padding: 13px 22px 13px 26px;
  display: flex; align-items: center; gap: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap; cursor: pointer;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    conic-gradient(from var(--like-angle), transparent 0deg, var(--accent) 60deg, var(--accent-light) 100deg, transparent 160deg) border-box;
  animation: likeBorderSpin 3s linear infinite;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.like-popup.visible { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.like-popup:hover {
  background:
    linear-gradient(rgba(139,124,248,0.06), rgba(139,124,248,0.06)) padding-box,
    conic-gradient(from var(--like-angle), transparent 0deg, var(--accent) 60deg, var(--accent-light) 100deg, transparent 160deg) border-box;
}
.like-popup p { font-size: 14px; color: var(--text-muted); margin: 0; pointer-events: none; }
.like-btn {
  background: none; border: none;
  font-size: 22px; color: var(--text-subtle);
  transition: color 0.2s ease;
  line-height: 1; padding: 0; pointer-events: none;
}
.like-popup.liked .like-btn { color: var(--accent); animation: likePop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes likePop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}
/* ── COMMERCIAL KITS SECTION ─────────────────────────────────────────────── */
.kits-section {
  margin-bottom: 72px;
}
.kits-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-left: 10px;
  vertical-align: middle;
}
.kits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.kit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
}
.kit-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.kit-thumb-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.kit-thumb-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.kit-card:hover .kit-thumb-link img { transform: scale(1.04); }
.kit-info {
  padding: 13px 14px 14px;
}
.kit-name {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px;
}
.kit-name a { color: inherit; }
.kit-meta {
  font-size: 11.5px; color: var(--text-subtle); margin-bottom: 11px;
}
.kit-buy {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 4px 11px;
  transition: background var(--ease);
}
.kit-buy:hover { background: var(--accent-dim); }
@media (max-width: 800px) {
  .kits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .kits-grid { grid-template-columns: 1fr; }
}

/* ── PROJECT FILTER ─────────────────────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 8px; margin-bottom: 32px;
}
.filter-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-subtle); border-radius: 50px;
  padding: 7px 18px; font-size: 13px; font-family: var(--font);
  cursor: pointer; transition: all 0.18s ease;
}
.filter-btn:hover { border-color: var(--border-hover); color: var(--text-muted); }
.filter-btn.active {
  background: var(--accent-dim); border-color: var(--accent-border);
  color: var(--accent);
}
.project-card { transition: opacity 0.25s ease, transform 0.25s ease; }
.project-card.hidden { opacity: 0; pointer-events: none; position: absolute; visibility: hidden; }

/* ── RARITY TIER CARDS ───────────────────────────────────────────────────── */
.rarity-grid {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 8px;
}
.rarity-card {
  flex: 1; min-width: 72px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color var(--ease);
}
.rarity-card:hover { border-color: var(--border-hover); }
.rarity-dot {
  width: 24px; height: 24px; border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}
.rarity-name {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted); text-align: center;
}

/* ── RARITY VARIABLE BLOCK ───────────────────────────────────────────────── */
.rarity-variable-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: start; margin: 32px 0;
}
.rarity-variable-headline {
  font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; margin-bottom: 16px;
}
.rarity-variable-headline em { color: var(--accent); font-style: normal; }
.rarity-sub {
  font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px;
}
.rarity-updates { display: flex; flex-wrap: wrap; gap: 8px; }
.rarity-update-item {
  font-size: 12px; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 10px;
}
.rarity-cards-col {
  display: flex; flex-direction: column; gap: 12px;
}
.rarity-cards-col img { width: 100%; display: block; border-radius: var(--radius); }
.rarity-cards-row {
  display: flex; flex-direction: row; gap: 12px; align-items: flex-start;
}
.rarity-cards-row img { flex: 1; min-width: 0; border-radius: var(--radius); display: block; }
@media (max-width: 700px) {
  .rarity-variable-block { grid-template-columns: 1fr; }
  .rarity-cards-col { flex-direction: row; }
}

/* ── KIT CTA BLOCK ───────────────────────────────────────────────────────── */
.kit-cta-block {
  margin-top: 52px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.kit-cta-block h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.kit-cta-block p { font-size: 13.5px; color: var(--text-muted); }

/* ── PROBLEM / GOAL 2-COL ─────────────────────────────────────────────────── */
.problem-goal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0;
}
.problem-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}
.problem-card-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.problem-card p { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin: 0; }
@media (max-width: 700px) {
  .problem-goal-grid { grid-template-columns: 1fr; }
  .rarity-card { min-width: 60px; }
  .kit-cta-block { flex-direction: column; align-items: flex-start; }
}

/* ── MORE WORK ───────────────────────────────────────────────────────────── */
.more-work-wrap { margin-top: 40px; }
.more-work-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 50px;
  padding: 9px 20px; font-size: 13px; font-family: var(--font);
  cursor: pointer; transition: all var(--ease); margin-bottom: 28px;
}
.more-work-toggle:hover { border-color: var(--border-hover); color: var(--text); }
.more-work-toggle.open { border-color: var(--accent-border); color: var(--accent); }
.more-work-count {
  background: var(--surface-2); border-radius: 100px;
  padding: 1px 8px; font-size: 11px; color: var(--text-subtle);
}
.toggle-arrow { display: inline-block; transition: transform 0.25s ease; }
.more-work-toggle.open .toggle-arrow { transform: rotate(180deg); }
.more-work-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.more-work-grid.open { display: grid; }

.liked-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 13px; color: var(--accent);
  opacity: 0.7; letter-spacing: 0.04em;
  animation: likedBadgeFade 0.6s ease forwards;
}
@keyframes likedBadgeFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 0.7; transform: translateY(0); } }
@media (max-width: 760px) {
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 16px; }
}

/* ─── MOBILE FIXES (touch only — desktop untouched) ───────────────────────── */
@media (hover: none) {
  /* Kill hover effects on touch devices — no sticky :hover on iOS */
  img.lb-trigger:hover { filter: none; transform: none; }
  .gallery-item:hover { transform: none; opacity: 1; }
  .gallery-item:hover img { border-color: var(--border); }
  /* Magnifier is mouse-only — hide it entirely on touch */
  #magnifier { display: none; }
}

@media (max-width: 760px) {
  /* Comparison grids → stack vertically on all project pages */
  .comparison-grid { grid-template-columns: 1fr !important; }

  /* Two-image rows → stack */
  .image-row { grid-template-columns: 1fr; }

  /* Prototype iframes → shorter height */
  .prototype-frame iframe { height: 300px !important; }

  /* Mood grid (4 moods) → 2 columns */
  .mood-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Feature card row → stack */
  .three-grid { grid-template-columns: 1fr !important; }

  /* Component gallery → 2 columns instead of 3 */
  .component-gallery { grid-template-columns: repeat(2, 1fr); }
  .gc-wide { grid-column: span 1; }

  /* Project meta → 2 columns already fine, keep it */

  /* Lightbox close button — bigger tap target on mobile */
  #lightbox-close { font-size: 42px; top: 14px; right: 18px; }
}
