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

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #181818;
  --line: rgba(255,255,255,0.07);
  --accent: #c8f55a;
  --accent2: #ff6b35;
  --text: #f0ede6;
  --muted: #999;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-serif: 'Instrument Serif', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
  cursor: none;
}

/* Custom cursor */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(200,245,90,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
}
.cursor.hover { width: 18px; height: 18px; }
.cursor-ring.hover { width: 60px; height: 60px; border-color: var(--accent); }

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
nav.scrolled {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  border-color: var(--line);
}
.nav-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 400;
  font-family: var(--font-mono);
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 100px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-name {
  font-size: clamp(56px, 8.5vw, 160px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}
.hero-name .italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(13px, 1.4vw, 20px);
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
  font-weight: 400;
  font-family: var(--font-mono);
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  gap: 20px;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 16px 32px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-primary:hover { background: #e8ff7a; transform: translateY(-2px); }
.btn-ghost {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  letter-spacing: 0.05em;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost::after { content: '→'; transition: transform 0.2s; }
.btn-ghost:hover::after { transform: translateX(4px); }

.hero-scroll {
  position: absolute;
  right: 48px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}
.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s 1.5s infinite;
}

/* Marquee strip */
.marquee-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  overflow: hidden;
  background: var(--bg2);
}
.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }

/* Sections */
section { padding: 120px 48px; }
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 64px;
}
.about-heading {
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.about-heading .accent { color: var(--accent); }
.about-heading .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.about-body {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 300;
}
.about-body strong { color: var(--text); font-weight: 400; }

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.skill-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 48px;
}
.stat-item {
  background: var(--bg);
  padding: 32px 24px;
  text-align: center;
}
.stat-num {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Libraries / Projects */
.libs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 64px;
}
.lib-card {
  background: var(--bg);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.lib-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.lib-card:hover::before { transform: scaleX(1); }
.lib-card:hover { background: var(--bg3); }
.lib-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 24px;
  opacity: 0.7;
}
.lib-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.lib-title span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: 18px;
}
.lib-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 28px;
}
.lib-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(200,245,90,0.08);
  color: var(--accent);
  border: 1px solid rgba(200,245,90,0.2);
}
.lib-arrow {
  position: absolute;
  bottom: 36px;
  right: 36px;
  font-size: 20px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.lib-card:hover .lib-arrow { color: var(--accent); transform: translate(4px, -4px); }

/* Selected Projects */
.projects-list { margin-top: 64px; }
.project-item {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 40px;
  cursor: pointer;
  transition: padding 0.3s;
  position: relative;
}
.project-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(200,245,90,0.02), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-item:hover { padding-left: 16px; }
.project-item:hover::after { opacity: 1; }
.project-item:last-child { border-bottom: 1px solid var(--line); }
.project-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  opacity: 0.6;
}
.project-info {}
.project-type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.project-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.project-name em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  color: var(--muted);
}
.project-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  max-width: 560px;
  line-height: 1.6;
  font-weight: 300;
}
.project-arrow {
  font-size: 28px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.project-item:hover .project-arrow { color: var(--accent); transform: translate(6px, -6px); }

/* Design section */
.design-section {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.design-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.design-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}
.design-quote span { color: var(--accent); }
.design-body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}
.design-body p { margin-bottom: 16px; }
.design-body strong { color: var(--text); font-weight: 400; }
.dribbble-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-top: 28px;
  padding: 14px 24px;
  border: 1px solid rgba(200,245,90,0.35);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s, border-color 0.2s, gap 0.2s;
}
.dribbble-link::after { content: '↗'; }
.dribbble-link:hover {
  background: rgba(200,245,90,0.07);
  border-color: var(--accent);
  gap: 14px;
}

/* Code block */
.code-showcase {
  position: relative;
  margin-top: 40px;
}
.code-header {
  background: var(--bg3);
  border: 1px solid var(--line);
  border-bottom: none;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.cd-red { background: #ff5f57; }
.cd-yellow { background: #ffbd2e; }
.cd-green { background: #28c840; }
.code-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
pre {
  background: var(--bg3);
  border: 1px solid var(--line);
  padding: 28px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: #888;
  max-height: 320px;
}
pre .kw { color: #c8f55a; }
pre .str { color: #ff9b6a; }
pre .cm { color: #444; font-style: italic; }
pre .fn { color: #87ceeb; }
pre .num { color: #c8f55a; opacity: 0.6; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  max-height: 94vh;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(60px);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.open .modal-panel {
  transform: translateY(0);
}
.modal-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.modal-close {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.1);
  background: none;
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  cursor: none;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); background: rgba(200,245,90,0.06); }
.modal-meta { flex: 1; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.modal-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.modal-title {
  font-size: clamp(18px, 2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.modal-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78em;
}
/* Ingress — first thing in modal body, replaces the old subtitle in the header */
.modal-ingress {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 40px 48px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
/* Real image / video styles */
.modal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.modal-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.modal-text {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}
.modal-text p { margin-bottom: 12px; }
.modal-text strong { color: var(--text); font-weight: 400; }
.modal-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-tech-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.modal-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 40px;
}
.modal-highlight {
  background: var(--bg2);
  padding: 24px 20px;
  text-align: center;
}
.modal-highlight-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.modal-highlight-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Real image / video styles */
.modal-img-hero {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 40px;
  background: #0d0d0d;
}
.modal-img-hero img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.modal-video-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 40px;
  background: #000;
}
.modal-video-wrap video {
  width: 100%;
  display: block;
  max-height: 520px;
  object-fit: contain;
  background: #000;
}
.modal-img-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 40px;
}
.modal-img-grid--4 { grid-template-columns: repeat(4, 1fr); }
.modal-img-grid--3 { grid-template-columns: repeat(3, 1fr); }
.modal-img-single { margin-bottom: 40px; }
.modal-img-grid div,
.modal-img-single {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0d0d;
}
.modal-img-grid img,
.modal-img-single img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1/1;
  transition: transform 0.4s ease;
}
.modal-img-grid div:hover img { transform: scale(1.03); }
.modal-img-single img { aspect-ratio: unset; }
.modal-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid rgba(200,245,90,0.25);
  transition: background 0.2s, border-color 0.2s;
}
.modal-ext-link:hover {
  background: rgba(200,245,90,0.06);
  border-color: var(--accent);
}
@media (max-width: 700px) {
  .modal-img-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .modal-img-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .modal-header { padding: 10px 20px; }
  .modal-body { padding: 24px 24px 40px; }
  .modal-cols { grid-template-columns: 1fr; gap: 32px; }
  .modal-highlights { grid-template-columns: 1fr; }
  .modal-gallery { grid-template-columns: 1fr; }
}

/* Modal loading skeleton */
.modal-skeleton {
  padding: 4px 0;
}
.modal-skeleton-line {
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.modal-body-enter {
  animation: modalBodyIn 0.35s ease forwards;
}
@keyframes modalBodyIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Contact */
.contact-section {
  text-align: center;
  padding: 160px 48px;
  position: relative;
  overflow: hidden;
}
.contact-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(120px, 20vw, 280px);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.contact-label::before, .contact-label::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.contact-heading {
  font-size: clamp(48px, 7vw, 100px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 32px;
  position: relative;
}
.contact-heading .italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.5vw, 18px);
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  padding: 20px 40px;
  border: 1px solid var(--line);
  margin-top: 16px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  position: relative;
}
.contact-email:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,245,90,0.04);
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 64px;
}
.social-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.social-link:hover { color: var(--accent); }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer-accent { color: var(--accent); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Laptop (1024–1280px) — primary problem range */
@media (max-width: 1280px) {
  nav { padding: 20px 36px; }
  .nav-links { gap: 28px; }
  section { padding: 100px 36px; }
  .hero { padding: 100px 36px 72px; }
  .modal-header { padding: 12px 32px; }
  .modal-body { padding: 24px 32px 40px; }
  .modal-cols { gap: 28px; }
  .modal-text { font-size: 13px; }
  .modal-ingress { font-size: 13px; }
  .modal-img-hero { margin-bottom: 24px; }
  .modal-video-wrap { margin-bottom: 24px; }
  .modal-img-grid { margin-bottom: 24px; }
  .modal-img-single { margin-bottom: 24px; }
}

/* Smaller laptops (900–1100px) — squeeze more */
@media (max-width: 1100px) {
  .modal-panel { max-height: 94vh; }
  .modal-cols { grid-template-columns: 1fr; gap: 24px; }
  .modal-img-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .libs-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { gap: 48px; }
  .projects-list { margin-top: 40px; }
  .project-name { font-size: 22px; }
  .project-name em { font-size: 18px; }
}

@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  section { padding: 80px 24px; }
  .hero { padding: 100px 24px 60px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .libs-grid { grid-template-columns: 1fr; }
  .design-inner { grid-template-columns: 1fr; }
  .project-item { grid-template-columns: 48px 1fr; }
  .project-arrow { display: none; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
  .hero-scroll { display: none; }
  .stat-row { grid-template-columns: 1fr; }
  .contact-section { padding: 100px 24px; }
  .modal-header { padding: 10px 20px; }
  .modal-body { padding: 20px 20px 36px; }
  .modal-cols { grid-template-columns: 1fr; gap: 20px; }
  .modal-img-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .modal-img-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .modal-highlights { grid-template-columns: 1fr; }
  .modal-gallery { grid-template-columns: 1fr; }
}