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

:root {
  --bg:     #f2ede4;
  --paper:  #ede8de;
  --ink:    #1c1812;
  --red:    #c0392b;
  --muted:  #8a8070;
  --rule:   #c8c0b0;
  --card:   #e8e2d8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Libre Baskerville', serif;
  font-size: 13px;
  line-height: 1.75;
  cursor: none;
  overflow-x: hidden;
}

/* ─── Cursor ────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1px solid var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.35;
  transition: transform 0.2s ease;
}

/* ─── Nav ───────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 60px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-color: var(--rule); }

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-family: 'Inconsolata', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }

/* ─── Hero ──────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 60px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-left { padding-top: 80px; }

.hero-label {
  font-family: 'Inconsolata', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(60px, 8vw, 108px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}
.hero-sub {
  margin-top: 36px;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.85;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}
.hero-cta {
  margin-top: 48px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Inconsolata', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
  transition: color 0.2s, border-color 0.2s, gap 0.3s;
}
.hero-cta::after { content: '→'; }
.hero-cta:hover { color: var(--red); border-color: var(--red); gap: 22px; }

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 80px;
  opacity: 0;
  animation: fadeIn 1s 0.6s forwards;
}
.hero-visual {
  width: 380px; height: 480px;
  position: relative;
}
.hero-block-1 {
  position: absolute;
  top: 0; right: 0;
  width: 280px; height: 340px;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.hero-block-2 {
  position: absolute;
  bottom: 0; left: 0;
  width: 200px; height: 260px;
  background: var(--red);
  opacity: 0.12;
}
.hero-block-3 {
  position: absolute;
  top: 60px; left: 20px;
  width: 120px; height: 160px;
  background: var(--ink);
  opacity: 0.05;
}
.hero-initials {
  position: absolute;
  top: 50%; right: 40px;
  transform: translateY(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 120px;
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
  opacity: 0.07;
  line-height: 1;
  letter-spacing: -0.04em;
}
.hero-tag {
  position: absolute;
  bottom: 40px; left: 40px;
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px; left: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}
.scroll-line {
  width: 40px; height: 1px;
  background: var(--muted);
  animation: expandLine 1s 1.5s both;
}

/* ─── Section Commons ───────────────────────────── */
section { padding: 120px 60px; }

.section-label {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 48px;
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}

/* ─── About ─────────────────────────────────────── */
#about {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.9;
  max-width: 460px;
}
.about-text p strong { color: var(--ink); font-weight: 700; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 40px;
}
.skill-item {
  background: var(--bg);
  padding: 20px 24px;
}
.skill-name {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.skill-bar {
  height: 1px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.skill-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--red);
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.stat-label {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ─── Projects ──────────────────────────────────── */
#projects {
  border-top: 1px solid var(--rule);
  background: var(--ink);
  color: var(--paper);
}
#projects .section-label { color: var(--red); }
#projects .section-title { color: var(--paper); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.project-card {
  background: #231e18;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: none;
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.project-card:hover { background: #2a241d; }
.project-card:hover::before { transform: scaleX(1); }

.project-num {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #554e45;
  margin-bottom: 60px;
}
.project-cat {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.project-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.2;
  margin-bottom: 14px;
}
.project-desc {
  font-size: 12px;
  color: #6a6055;
  line-height: 1.8;
}
.project-arrow {
  position: absolute;
  bottom: 36px; right: 36px;
  font-size: 18px;
  color: #554e45;
  transition: color 0.3s, transform 0.3s;
}
.project-card:hover .project-arrow {
  color: var(--red);
  transform: translate(4px, -4px);
}

/* ─── Contact ───────────────────────────────────── */
#contact {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-info .section-title { margin-bottom: 20px; }
.contact-info > p {
  color: var(--muted);
  max-width: 360px;
  line-height: 1.9;
  margin-bottom: 36px;
}
.contact-detail {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
}
.contact-detail-label {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  min-width: 70px;
}
.contact-detail a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-detail a:hover { color: var(--red); }
.contact-detail span { color: var(--muted); }

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group   { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input,
.form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  font-family: 'Libre Baskerville', serif;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--red); }
.form-textarea { resize: none; height: 110px; }

.form-submit {
  align-self: flex-start;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 15px 40px;
  font-family: 'Inconsolata', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.2s;
  margin-top: 8px;
}
.form-submit:hover { background: var(--red); }

/* ─── Footer ────────────────────────────────────── */
footer {
  border-top: 3px solid var(--ink);
  padding: 32px 60px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 5px; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
}
footer .logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
}
footer .copy {
  font-family: 'Inconsolata', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ─── Animations ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes expandLine {
  from { width: 0; }
  to   { width: 40px; }
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  #hero { grid-template-columns: 1fr; padding: 100px 24px 60px; }
  .hero-right { display: none; }
  section { padding: 80px 24px; }
  #about { grid-template-columns: 1fr; gap: 48px; }
  .projects-grid { grid-template-columns: 1fr; }
  #contact { grid-template-columns: 1fr; gap: 48px; }
  footer { padding: 28px 24px; flex-direction: column; gap: 10px; }
  .scroll-indicator { left: 24px; }
}

