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

:root {
  --cream: #F5F0E8;
  --ink: #0A0A08;
  --rust: #C4400A;
  --gold: #B8924A;
  --pale: #EDE8DF;
  --mid: #8A8478;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  overflow-x: hidden;
  cursor: none;
}

/* ─── CUSTOM CURSOR ─────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--cream);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1px solid var(--cream);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  mix-blend-mode: difference;
}
body.hovering .cursor-ring { width: 70px; height: 70px; }

/* ─── 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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9990;
  opacity: 0.4;
}

/* ─── NAV ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.15em;
  color: var(--cream);
  opacity: 0;
  animation: fadeDown 1s 0.5s forwards;
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  opacity: 0;
  animation: fadeDown 1s 0.7s forwards;
}
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--cream); }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── HERO ──────────────────────────────────────────────── */
#hero {
  height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, #1A1510 0%, var(--ink) 70%);
}
.hero-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(184,146,74,0.3), transparent);
}
.hero-line:nth-child(1) { left: 33%; animation: lineReveal 2s 0.3s both; }
.hero-line:nth-child(2) { left: 66%; animation: lineReveal 2s 0.6s both; }

@keyframes lineReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.floating-year {
  position: absolute;
  top: 120px; right: 48px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--mid);
  opacity: 0;
  animation: fadeIn 1s 1.5s forwards;
  writing-mode: vertical-rl;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}
.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 24px;
  opacity: 0;
  animation: slideUp 1s 0.8s forwards;
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(80px, 14vw, 180px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  overflow: hidden;
  color: var(--cream);
}
.title-line {
  display: block;
  transform: translateY(110%);
  animation: revealLine 1.2s cubic-bezier(0.77,0,0.175,1) forwards;
}
.title-line:nth-child(1) { animation-delay: 0.9s; }
.title-line:nth-child(2) { animation-delay: 1.05s; color: var(--gold); }
.title-line:nth-child(3) { animation-delay: 1.2s; }

@keyframes revealLine {
  to { transform: translateY(0); }
}

.hero-sub {
  margin-top: 40px;
  font-size: 20px;
  font-style: italic;
  color: var(--mid);
  max-width: 480px;
  line-height: 1.6;
  opacity: 0;
  animation: slideUp 1s 1.5s forwards;
}
.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 24px;
  align-items: center;
  opacity: 0;
  animation: slideUp 1s 1.7s forwards;
}

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 14px 40px;
  background: var(--rust);
  color: var(--cream);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.3s;
}
.btn-ghost::after {
  content: '';
  width: 30px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s;
}
.btn-ghost:hover { color: var(--cream); }
.btn-ghost:hover::after { width: 50px; }

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

/* ─── SCROLL INDICATOR ──────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 80px; right: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
  opacity: 0;
  animation: fadeIn 1s 2.2s forwards;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ─── MARQUEE ───────────────────────────────────────────── */
.marquee-section {
  padding: 40px 0;
  border-top: 1px solid rgba(184,146,74,0.2);
  border-bottom: 1px solid rgba(184,146,74,0.2);
  overflow: hidden;
  background: rgba(184,146,74,0.03);
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 20s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--gold);
  opacity: 0.6;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 60px;
}
.marquee-item::after {
  content: '✦';
  font-size: 8px;
  opacity: 0.4;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── WORK SECTION ──────────────────────────────────────── */
#work { padding: 120px 48px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 80px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 32px;
}
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--cream);
}
.section-count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.2em;
}

/* ─── PROJECT CARDS ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.project-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #111108;
  cursor: none;
}
.project-card.large {
  grid-column: span 2;
  aspect-ratio: 16/7;
}
.project-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.project-card:hover .project-bg { transform: scale(1.08); }

.card-bg-1 { background: linear-gradient(135deg, #1A0E05 0%, #2D1810 50%, #0A0A08 100%); }
.card-bg-2 { background: linear-gradient(135deg, #050F1A 0%, #0D2030 50%, #0A0A08 100%); }
.card-bg-3 { background: linear-gradient(135deg, #0A1505 0%, #1A2D10 50%, #0A0A08 100%); }
.card-bg-4 { background: linear-gradient(135deg, #14050A 0%, #2A0F1A 50%, #0A0A08 100%); }
.card-bg-5 { background: linear-gradient(135deg, #0F0A05 0%, #221808 50%, #0A0A08 100%); }

/* Real image cards */
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: brightness(0.75) saturate(0.9);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.project-card:hover .card-img {
  filter: brightness(0.5) saturate(1.1);
}

.card-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.15;
  transition: opacity 0.6s, transform 0.8s;
}
.project-card:hover .card-shape { opacity: 0.35; }
.shape-rust  { background: var(--rust); }
.shape-gold  { background: var(--gold); }
.shape-blue  { background: #1A6B8A; }
.shape-green { background: #3A6B2A; }

.project-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.project-card:hover .project-info { transform: translateY(0); opacity: 1; }

.project-always-visible {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  transition: opacity 0.3s;
}
.project-card:hover .project-always-visible { opacity: 0; }

.project-number {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 8px;
}
.project-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 0.05em;
  color: var(--cream);
  margin-bottom: 4px;
}
.project-name-hov {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.05em;
  color: var(--cream);
  margin-bottom: 12px;
}
.project-type {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
}
.project-desc {
  font-size: 15px;
  font-style: italic;
  color: rgba(245,240,232,0.7);
  margin-bottom: 20px;
  line-height: 1.5;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
  transition: gap 0.3s;
}
.project-link:hover { gap: 18px; }
.project-link::after { content: '→'; }

/* ─── ABOUT ─────────────────────────────────────────────── */
#about {
  padding: 120px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  
  border-top: 1px solid rgba(255,255,255,0.06);
}
.about-visual {
  position: relative;
  aspect-ratio: 3/4;
}
.about-frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(184,146,74,0.3);
  transform: translate(16px, 16px);
  transition: transform 0.5s;
}
.about-frame:hover { transform: translate(8px, 8px); }

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #141410 0%, #1E1E18 50%, #0F0F0C 100%);
  position: relative;
  overflow: hidden;
}
.about-photo-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(196,64,10,0.15), transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(184,146,74,0.1), transparent 60%);
}
.about-initials {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 120px;
  color: rgba(245,240,232,0.04);
  letter-spacing: 0.1em;
}
.about-tag {
  position: absolute;
  bottom: -1px; left: -1px;
  background: var(--rust);
  padding: 10px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream);
}
.about-text .section-label { margin-bottom: 12px; }
.about-text .section-title { margin-bottom: 32px; font-size: clamp(40px, 5vw, 72px); }

.about-bio {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(245,240,232,0.7);
  margin-bottom: 20px;
}
.about-bio em { color: var(--cream); font-style: italic; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.skill-item {
  border-left: 2px solid var(--rust);
  padding-left: 16px;
}
.skill-name {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 4px;
}
.skill-level {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--mid);
}

/* ─── STATS BAR ─────────────────────────────────────────── */
.stats-bar {
  padding: 80px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(184,146,74,0.05);
  border-top: 1px solid rgba(184,146,74,0.15);
  border-bottom: 1px solid rgba(184,146,74,0.15);
}
.stat-item {
  padding: 40px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 72px;
  color: var(--cream);
  line-height: 1;
  display: inline-block;
}
.stat-number::after {
  content: attr(data-suffix);
  color: var(--gold);
  font-size: 40px;
}
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 8px;
}

/* ─── CONTACT ───────────────────────────────────────────── */
#contact {
  padding: 120px 48px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(100px, 18vw, 240px);
  color: rgba(245,240,232,0.02);
  letter-spacing: 0.1em;
  white-space: nowrap;
  pointer-events: none;
}
.contact-label { margin-bottom: 16px; }

.contact-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(60px, 10vw, 130px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--cream);
  margin-bottom: 40px;
}
.contact-title em {
  font-style: italic;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
}
.contact-sub {
  font-size: 20px;
  font-style: italic;
  color: var(--mid);
  margin-bottom: 60px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.contact-email {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: 0.08em;
  color: var(--cream);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}
.contact-email::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--rust);
  transition: width 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.contact-email:hover::after { width: 100%; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 60px;
}
.social-link {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}
.social-link::before {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}
.social-link:hover { color: var(--cream); }
.social-link:hover::before { width: 100%; }

/* ─── FOOTER ────────────────────────────────────────────── */
footer {
  padding: 32px 48px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--mid);
}

/* ─── SCROLL REVEAL ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.9s cubic-bezier(0.25,0.46,0.45,0.94);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 20px 24px; }
  .nav-links { display: none; }
  #hero { padding: 0 24px 60px; }
  #work { padding: 80px 24px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.large { grid-column: span 1; aspect-ratio: 4/3; }
  #about { grid-template-columns: 1fr; padding: 80px 24px; }
  .about-visual { aspect-ratio: 1; max-height: 350px; }
  .stats-bar { grid-template-columns: 1fr 1fr; padding: 40px 24px; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  #contact { padding: 80px 24px 60px; }
  footer { padding: 24px; flex-direction: column; gap: 12px; text-align: center; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
