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

:root {
  --bg: #1a2130;
  --bg-dark: #141b27;
  --dot: rgba(180, 200, 230, 0.18);
  --dot-active: rgba(220, 240, 255, 0.35);
  --orange: #e07840;
  --orange-light: #f0a060;
  --cream: #f0e8d8;
  --muted: rgba(240, 232, 216, 0.45);
  --gap: 22px;
  --dot-size: 3px;
  --font-family-monospace: 'Space Mono', monospace;
  --font-family-sans: 'Roboto', Helvetica, Arial, sans-serif;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg-dark);
  color: var(--cream);
  font-family: var(--font-family-sans);
  overflow: hidden;
  cursor: none;
}

/* ── CANVAS DOT GRID ── */
#grid-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── LAYOUT ── */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  height: 100vh;
  height: 100dvh;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.page::-webkit-scrollbar { display: none; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 60px;
  background-color: #141b27cc;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
}

.nav-logo {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--orange);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
  width: 32px; height: 32px;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  cursor: none;
}

.nav-links li:nth-child(1) a { animation-delay: 0.35s; }
.nav-links li:nth-child(2) a { animation-delay: 0.45s; }
.nav-links li:nth-child(3) a { animation-delay: 0.55s; }
.nav-links li:nth-child(4) a { animation-delay: 0.65s; }

.nav-links a:hover { color: var(--orange-light); cursor: none; }

/* ── HERO ── */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 0 60px;
  overflow-y: auto;
  scrollbar-width: none;
}

.hero::-webkit-scrollbar { display: none; }

.hero-inner {
  max-width: 900px;
}

.hero-tag {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.5s forwards;
}

.hero-name {
  font-family: var(--font-family-monospace);
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--cream);
  overflow: hidden;
}

.hero-name .line {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  animation: slideUp 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}

.hero-name .line:nth-child(1) { animation-delay: 0.6s; color: var(--cream); }
.hero-name .line:nth-child(2) {
  animation-delay: 0.75s;
  color: transparent;
  -webkit-text-stroke: 1px var(--orange);
}

.hero-divider {
  margin: 36px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 0.9s ease 1s forwards;
}

.divider-line {
  height: 2px;
  width: 260px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light), transparent);
  border-radius: 2px;
}

.divider-dots {
  display: flex;
  gap: 6px;
}

.divider-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.divider-dots span:first-child { background: var(--cream); }

.hero-subtitle {
  font-family: var(--font-family-sans);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.08em;
  line-height: 1.5;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.1s forwards;
}

.hero-portfolio {
  margin-top: 36px;
  font-family: var(--font-family-monospace);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  opacity: 0;
  animation: fadeUp 0.9s ease 1.25s forwards;
}

.hero-portfolio .dot-accent {
  color: var(--cream);
  font-size: 0.4em;
  vertical-align: super;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.6s forwards;
  white-space: nowrap;
  transition: opacity 0.4s ease;
}

.scroll-hint span {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.scroll-hint .scroll-arrow {
  font-size: 22px;
  letter-spacing: 0;
  color: var(--orange);
}

.scroll-line {
  width: 40px; height: 1px;
  background: var(--orange);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cream);
  animation: scanLine 1.8s ease-in-out infinite;
}

/* ── WORK SECTION ── */
.section {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 120px 60px;
  overflow-y: auto;
  scrollbar-width: none;
}

.section::-webkit-scrollbar { display: none; }


.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 80px;
}

.section-num {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--orange);
}

.section-title {
  font-family: var(--font-family-monospace);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
}

.work-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, background 0.4s;
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(224,120,64,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.work-card:hover { border-color: rgba(224,120,64,0.4); background: rgba(224,120,64,0.04); }
.work-card:hover::before { opacity: 1; }

.card-num {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--orange);
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-family-monospace);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: var(--cream);
}

.card-desc {
  font-family: var(--font-family-sans);
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid rgba(224,120,64,0.35);
  padding: 4px 10px;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  font-family: var(--font-family-sans);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-text p strong {
  color: var(--cream);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.stat-box {
  border: 1px solid rgba(255,255,255,0.06);
  padding: 32px;
  background: rgba(0,0,0,0.3);
}

.stat-num {
  font-family: var(--font-family-monospace);
  font-size: 48px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── CONTACT ── */
.contact-inner {
  max-width: 700px;
}

.contact-email {
  font-family: var(--font-family-monospace);
  font-size: clamp(18px, 3vw, 36px);
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: inline-block;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
  margin-top: 30px;
}

.contact-email:hover { color: var(--orange-light); border-color: var(--orange-light); }

/* ── FOOTER ── */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 60px;
  background-color: #141b27cc;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(6px);
}

footer span {
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
}

.social-links {
  display: flex;
  gap: 24px;
}

.social-links a {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}

.social-links a:hover { color: var(--orange); }

/* ── NAV TOGGLE (mobile) ── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 18px;
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1;
}

/* ── CURSOR ── */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
  mix-blend-mode: screen;
}

.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(224,120,64,0.5);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform 0.12s ease, width 0.3s, height 0.3s;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.88);
  backdrop-filter: blur(4px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border: 1px solid rgba(224,120,64,0.25);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 52px 56px;
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

.lightbox.open .lightbox-panel {
  transform: translateY(0);
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.lightbox-num {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--orange);
}

.lightbox-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  transition: border-color 0.3s, color 0.3s;
}

.lightbox-close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.lightbox-title {
  font-family: var(--font-family-monospace);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cream);
  margin-bottom: 10px;
}

.lightbox-role {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 28px;
}

.lightbox-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--orange), transparent);
  margin-bottom: 28px;
}

.lightbox-desc {
  font-family: var(--font-family-sans);
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.lightbox-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.lightbox-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.lb-img-slot {
  aspect-ratio: 4/3;
  border: 1px dashed rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
}

.lightbox-images img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .lightbox { padding: 0; align-items: flex-end; }
  .lightbox-panel { max-height: 85vh; padding: 36px 28px; }
  .lightbox-images { grid-template-columns: 1fr; }
}

/* ── KEYFRAMES ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scanLine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 768px) {
  nav { padding: 12px 28px; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .hero, .section { padding-left: 28px; padding-right: 28px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  footer { padding: 10px 28px; flex-direction: column; gap: 6px; text-align: center; }
}

a.cv-link {
  border: var(--orange) solid 1px;
  border-radius: 2px;
  padding: 6px 8px 2px;
  margin-left: 8px;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
}

a.cv-link:hover {
  background-color: #e0784050;
  color: var(--orange-light);
  border-color: var(--orange-light);
}
