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

:root {
  --bg: #04040e;
  --bg2: #07071a;
  --surface: #0a0a1f;
  --line: #141432;
  --text: #c8d4e8;
  --muted: #485070;
  --accent: #0099cc;
  --accent2: #5a18cc;
  --red: #e02060;
  --glow: rgba(0, 153, 204, 0.14);
  --glow-strong: rgba(0, 153, 204, 0.30);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  cursor: none;
}

/* ═══════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════ */
.cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--accent), 0 0 20px var(--glow);
  transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s, box-shadow 0.2s;
}
.cursor-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1px solid rgba(0, 153, 204, 0.5);
  border-radius: 0; /* square ring for cyberpunk feel */
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.15s ease-out, width 0.3s, height 0.3s;
}
body:has(a:hover) .cursor, body:has(button:hover) .cursor { width: 10px; height: 10px; background: var(--red); box-shadow: 0 0 12px var(--red), 0 0 28px rgba(224,32,96,0.4); }
body:has(a:hover) .cursor-ring, body:has(button:hover) .cursor-ring { width: 44px; height: 44px; border-color: rgba(224,32,96,0.6); }

/* ═══════════════════════════════
   NAV
═══════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 56px;
}
.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 0 12px var(--glow-strong);
}
.nav-links {
  display: flex; gap: 40px; list-style: none;
}
.nav-links a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover { color: var(--accent); text-shadow: 0 0 10px var(--glow-strong); }

/* ═══════════════════════════════
   HERO SECTION
═══════════════════════════════ */
#hero {
  position: relative;
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
}

/* Subtle scanline + grid overlay */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}

/* Background decorative lines */
.hero-lines {
  position: absolute; inset: 0; pointer-events: none;
}
.hero-lines span {
  position: absolute;
  background: var(--line);
  box-shadow: 0 0 8px rgba(0,229,255,0.06);
}
.hero-lines .vl { width: 1px; top: 0; bottom: 0; }
.hero-lines .hl { height: 1px; left: 0; right: 0; }
.hero-lines .vl:nth-child(1) { left: 56px; }
.hero-lines .vl:nth-child(2) { right: 56px; }
.hero-lines .hl:nth-child(3) { top: 80px; }
.hero-lines .hl:nth-child(4) { bottom: 80px; }

/* The main animation container */
.hero-type-wrapper {
  position: relative;
  text-align: center;
  z-index: 2;
}

/* CAMAD — big Orbitron letters */
#type-display {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(72px, 14vw, 180px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1;
  display: flex;
  justify-content: center;
  gap: 0.06em;
  min-height: 1.1em;
}

.type-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.05s, transform 0.15s;
}
.type-char.visible {
  opacity: 1;
  transform: translateY(0);
  text-shadow: 0 0 20px var(--glow-strong), 0 0 60px var(--glow);
}
.type-char.fading {
  opacity: 0;
  transform: translateY(-30px) scale(1.05);
  transition: opacity 0.6s ease-in, transform 0.6s ease-in;
}

/* Cameron Adams — revealed name */
#full-name {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}
#full-name.visible { opacity: 1; }

.name-first {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 9.5vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
  font-style: italic;
}
.name-last {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 9.5vw, 120px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-shadow: 0 0 30px var(--glow-strong), 0 0 80px var(--glow);
}

/* Subtitle beneath name */
.hero-sub {
  margin-top: 36px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.8s ease 0.4s;
}
#full-name.visible .hero-sub { opacity: 1; }

/* Scroll cue */
.scroll-cue {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 4.5s forwards;
}
.scroll-cue span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollPulse 2s ease 4.5s infinite;
}

/* ═══════════════════════════════
   WORK SECTION
═══════════════════════════════ */
#work {
  padding: 120px 56px;
  border-top: 1px solid var(--line);
}
.section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 64px;
  display: flex; align-items: center; gap: 20px;
  text-shadow: 0 0 10px var(--glow-strong);
}
.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  position: relative;
}

.work-item {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface);
  overflow: hidden;
  cursor: none;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

/* Dim other cards when one is expanded */
.work-grid.has-expanded .work-item:not(.expanded) {
  opacity: 0.25;
  filter: brightness(0.5);
}

.work-item::after {
  content: attr(data-num);
  position: absolute;
  top: 20px; right: 20px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}
.work-item-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(to top, rgba(4,4,14,0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.work-item:hover .work-item-inner { opacity: 1; }
.work-item:hover:not(.expanded) { transform: scale(0.99); transition: transform 0.3s, opacity 0.35s, filter 0.35s; }

.work-bg {
  position: absolute; inset: 0;
  transition: transform 0.5s ease;
}
.work-item:hover .work-bg { transform: scale(1.04); }

/* ── Expanded overlay panel ── */
.work-expanded-panel {
  display: none;
  position: absolute;
  /* will be positioned by JS — spans the full grid width, centred on the two rows */
  left: 0; right: 0;
  z-index: 20;
  pointer-events: none;
}
.work-expanded-panel.active {
  display: flex;
  pointer-events: auto;
}

.work-expanded-inner {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: 0 0 60px var(--glow), 0 0 120px rgba(0,153,204,0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 340px;
  animation: expandIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes expandIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes expandOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.94); }
}

.work-expanded-preview {
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.work-expanded-preview .work-bg {
  transform: none !important;
}
.work-expanded-preview svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
/* Accent border on left edge */
.work-expanded-preview::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 1px; height: 100%;
  background: var(--line);
}

.work-expanded-info {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.work-expanded-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}
.work-expanded-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.work-expanded-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--glow-strong);
  margin-bottom: 28px;
}
.work-expanded-desc {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  flex: 1;
  margin-bottom: 32px;
}
.work-expanded-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.work-expanded-cta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 24px;
  text-decoration: none;
  cursor: none;
  box-shadow: 0 0 12px var(--glow), inset 0 0 10px var(--glow);
  transition: background 0.2s, color 0.2s;
}
.work-expanded-cta:hover {
  background: var(--accent);
  color: var(--bg);
}
.work-expanded-close {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: none;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}
.work-expanded-close:hover { color: var(--red); }

.work-bg-1 { background: linear-gradient(135deg, #0d1a2a 0%, #080d14 100%); }
.work-bg-2 { background: linear-gradient(135deg, #1a0d1f 0%, #0e0812 100%); }
.work-bg-3 { background: linear-gradient(135deg, #0a1a1a 0%, #060f0f 100%); }
.work-bg-4 { background: linear-gradient(135deg, #1a1a0d 0%, #0d0d08 100%); }
.work-bg-5 { background: linear-gradient(135deg, #0d0d1a 0%, #080814 100%); }
.work-bg-6 { background: linear-gradient(135deg, #1a0d0d 0%, #120808 100%); }

.work-shape {
  position: absolute;
  border-radius: 2px;
}

.work-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.work-tags {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--glow);
}

/* ═══════════════════════════════
   ABOUT SECTION
═══════════════════════════════ */
#about {
  padding: 120px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  border-top: 1px solid var(--line);
}
.about-text h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 32px;
  color: var(--text);
  letter-spacing: 0.04em;
}
.about-text h2 em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 20px var(--glow-strong);
}
.about-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 20px;
  font-family: 'Syne', sans-serif;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  align-self: start;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 36px 28px;
}
.stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--glow-strong);
}
.stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ═══════════════════════════════
   SKILLS SECTION
═══════════════════════════════ */
#skills {
  padding: 120px 56px;
  border-top: 1px solid var(--line);
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 0;
}
.skill-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 22px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s, text-shadow 0.2s, box-shadow 0.2s;
}
.skill-pill:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  text-shadow: 0 0 10px var(--glow-strong);
  box-shadow: 0 0 16px var(--glow), inset 0 0 12px var(--glow);
}

/* ═══════════════════════════════
   CONTACT SECTION
═══════════════════════════════ */
#contact {
  padding: 120px 56px;
  border-top: 1px solid var(--line);
  text-align: center;
}
#contact h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: 0.06em;
}
#contact h2 span { color: var(--accent); text-shadow: 0 0 30px var(--glow-strong), 0 0 80px var(--glow); }
#contact p {
  color: var(--muted);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 48px;
  line-height: 1.8;
  font-family: 'Syne', sans-serif;
}
.cta-btn {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 16px 52px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  box-shadow: 0 0 16px var(--glow), inset 0 0 16px var(--glow);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.cta-btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 40px var(--glow-strong), inset 0 0 20px rgba(0,229,255,0.2);
}

/* ═══════════════════════════════
   FOOTER
═══════════════════════════════ */
footer {
  padding: 40px 56px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
}

/* ═══════════════════════════════
   ANIMATIONS
═══════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
