:root {
  --bg: #0c0d10;
  --bg-2: #13151c;
  --ink: #efe8d8;
  --muted: #9a937f;
  --line: rgba(239, 232, 216, 0.12);
  --accent: #d96a3a;
  --accent-2: #c9b37a;
  --ok: #7dba6a;
  --serif: "Noto Serif SC", "Instrument Serif", Georgia, serif;
  --sans: "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  width: 420px;
  height: 420px;
  background: rgba(217, 106, 58, 0.18);
  top: -80px;
  right: -60px;
}

.orb-b {
  width: 360px;
  height: 360px;
  background: rgba(201, 179, 122, 0.1);
  bottom: 10%;
  left: -120px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  backdrop-filter: blur(16px);
  background: rgba(12, 13, 16, 0.72);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--mono);
  letter-spacing: 0.18em;
  font-size: 13px;
}

.nav nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

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

.nav-cta {
  font-size: 13px;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 14vh 6vw 12vh;
  max-width: 1180px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 28px;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 7.2vw, 92px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 .line {
  display: block;
}

h1 .italic {
  font-style: italic;
  color: var(--accent);
}

.lede {
  max-width: 560px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 17px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 820px;
}

.meta-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(125, 186, 106, 0.18);
}

.section {
  padding: 10vh 6vw;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 48px;
}

.index {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 13px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}

.portrait-frame {
  width: 240px;
  height: 300px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(217, 106, 58, 0.35), transparent 55%),
    linear-gradient(20deg, #1b1e28, #0e1016);
  display: grid;
  place-items: center;
  position: relative;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(239, 232, 216, 0.08);
}

.portrait-mark {
  font-family: var(--serif);
  font-size: 96px;
  color: var(--ink);
  opacity: 0.9;
}

.portrait-cap {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.about-copy p + p {
  margin-top: 16px;
}

.about-copy p {
  color: #d7d0bf;
  max-width: 62ch;
}

.facts {
  display: flex;
  gap: 32px;
  list-style: none;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent-2);
}

.skills {
  margin-top: 64px;
}

.skills-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-row span {
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.projects {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.project {
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 106, 58, 0.45);
}

.featured {
  grid-row: span 2;
}

.project-visual {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.featured .project-visual {
  height: 260px;
}

.v1 {
  background: radial-gradient(circle at 20% 80%, rgba(217, 106, 58, 0.35), transparent 50%), #161821;
}

.v2 {
  background: linear-gradient(135deg, #1a2230, #12141b);
}

.v3 {
  background: #151318;
}

.chart {
  position: absolute;
  inset: 40px 32px 24px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.chart span {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), rgba(217, 106, 58, 0.2));
  border-radius: 2px 2px 0 0;
}

.chart span:nth-child(1) { height: 38%; }
.chart span:nth-child(2) { height: 56%; }
.chart span:nth-child(3) { height: 44%; }
.chart span:nth-child(4) { height: 78%; }
.chart span:nth-child(5) { height: 62%; }
.chart span:nth-child(6) { height: 90%; }

.cards-stack {
  position: absolute;
  inset: 0;
}

.cards-stack i {
  position: absolute;
  width: 120px;
  height: 76px;
  border: 1px solid rgba(239, 232, 216, 0.2);
  background: rgba(239, 232, 216, 0.06);
  border-radius: 8px;
}

.cards-stack i:nth-child(1) { top: 42px; left: 48px; transform: rotate(-8deg); }
.cards-stack i:nth-child(2) { top: 58px; left: 92px; transform: rotate(4deg); }
.cards-stack i:nth-child(3) { top: 78px; left: 70px; transform: rotate(12deg); }

.ring {
  width: 140px;
  height: 140px;
  border: 18px solid rgba(201, 179, 122, 0.2);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
}

.project-body {
  padding: 22px 24px 26px;
}

.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.project-body h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 10px;
}

.project-body p,
.project-body li {
  color: var(--muted);
  font-size: 14px;
}

.project-body ul {
  margin-top: 14px;
  padding-left: 18px;
}

.timeline {
  list-style: none;
  max-width: 780px;
}

.timeline li {
  padding: 0 0 36px 28px;
  border-left: 1px solid var(--line);
  position: relative;
}

.timeline li::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: -5px;
  top: 6px;
}

.timeline time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-2);
}

.timeline h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 6px 0 8px;
}

.timeline p {
  color: var(--muted);
}

.contact-lead {
  max-width: 540px;
  color: var(--muted);
  margin-bottom: 36px;
}

.mail {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  display: inline-block;
  border-bottom: 1px solid var(--accent);
  line-height: 1.3;
}

.mail:hover {
  color: var(--accent);
}

.links {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

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

footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 6vw 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.year {
  font-family: var(--mono);
}

@media (max-width: 860px) {
  .nav nav {
    display: none;
  }

  .hero {
    padding-top: 10vh;
  }

  .hero-meta,
  .about-grid,
  .projects {
    grid-template-columns: 1fr;
  }

  .featured {
    grid-row: auto;
  }

  .facts {
    flex-direction: column;
    gap: 16px;
  }
}
