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

:root {
  --bg: #E8E2D9;
  --ink: #1C1B18;
  --muted: #7A7570;
  --accent: #C0392B;
  --line: #C8C2B6;
  --card: #DDD8CE;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  cursor: none;
}

/* 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: 1000;
  opacity: 0.5;
}

/* Cursor */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: width 0.2s, height 0.2s, opacity 0.2s;
  transform: translate(-50%, -50%);
}

body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 48px; height: 48px;
  opacity: 0.5;
}

/* Layout */
.container { max-width: 860px; margin: 0 auto; padding: 0 32px; }

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

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

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  padding-top: 100px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero-bg-number {
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(200px, 30vw, 400px);
  color: var(--line);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.hero-content { position: relative; z-index: 1; }

.hero-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--accent);
}

h1.hero-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(52px, 9vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 32px;
}

h1.hero-name em {
  font-style: italic;
  color: var(--muted);
}

.hero-desc {
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: none;
  transition: background 0.2s, color 0.2s;
}

.btn:hover { background: var(--ink); color: var(--bg); }

.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

.hero-status {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-lr;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #27ae60;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Sections */
section {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}

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

.section-num {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

h2.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

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

.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.9;
}

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

.about-meta { display: flex; flex-direction: column; }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.meta-label { color: var(--muted); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.meta-val { color: var(--ink); }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.skill-cell {
  background: var(--bg);
  padding: 24px 20px;
  transition: background 0.2s;
}

.skill-cell:hover { background: var(--card); }

.skill-cell-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.skill-cell-items {
  color: var(--ink);
  font-size: 12px;
  line-height: 2;
}

/* Projects */
.projects-list { display: flex; flex-direction: column; }

.project-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 32px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.project-item::after {
  content: '↗';
  position: absolute;
  right: 0; top: 40px;
  font-size: 18px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translate(-4px, 4px);
}

.project-item:hover::after { opacity: 1; transform: translate(0, 0); }
.project-item:hover .project-title { color: var(--accent); }

.project-num { font-size: 11px; color: var(--muted); padding-top: 4px; }

.project-title {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.project-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 16px;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 8px;
}

.project-year { font-size: 11px; color: var(--muted); padding-top: 4px; white-space: nowrap; }

/* Experience */
.exp-list { display: flex; flex-direction: column; }

.exp-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.exp-role {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.exp-company {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.exp-desc { color: var(--muted); font-size: 12px; line-height: 1.8; max-width: 520px; }

.exp-period { font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap; }

/* Certifications */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cert-card {
  background: var(--bg);
  padding: 28px 24px;
  transition: background 0.2s;
}

.cert-card:hover { background: var(--card); }

.cert-issuer {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.cert-name {
  font-family: 'Instrument Serif', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.cert-year { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* Contact */
#contact { border-bottom: none; }

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0;
}

.contact-big {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 40px;
}

.contact-big em { font-style: italic; color: var(--muted); }

.contact-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Footer */
footer {
  padding: 32px 0;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }
.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: 640px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .project-item { grid-template-columns: 32px 1fr; }
  .project-year { display: none; }
  .exp-item { grid-template-columns: 1fr; gap: 4px; }
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .hero-status { display: none; }
  .hero-links { gap: 8px; }
}