:root {
  color-scheme: dark;
  --ink: #f4f1e9;
  --muted: #9b9c94;
  --dim: #65675f;
  --line: rgba(255, 255, 255, .11);
  --accent: #c8ff62;
  --accent-soft: rgba(200, 255, 98, .09);
  --background: #0b0d0b;
  --panel: #111410;
  --page: min(1440px, calc(100vw - 12vw));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--background);
  background-size: 72px 72px;
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

::selection { color: #0b0d0b; background: var(--accent); }

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

.cursor-glow {
  --x: 75vw;
  --y: 25vh;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--x) var(--y), rgba(200,255,98,.055), transparent 70%);
}

.site-header, main, footer { width: var(--page); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 10;
  height: 100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font-size: 18px; font-weight: 600; text-decoration: none; letter-spacing: -.03em; }
.brand-mark { position: relative; display: grid; width: 38px; height: 30px; place-items: center; border: 1px solid rgba(200,255,98,.38); border-radius: 7px; color: var(--accent); background: linear-gradient(135deg, rgba(200,255,98,.12), rgba(200,255,98,.025)); box-shadow: inset 0 0 18px rgba(200,255,98,.04); font: 500 10px "DM Mono", monospace; letter-spacing: .1em; }
.brand-mark::after { content: ""; position: absolute; top: -3px; right: -3px; width: 6px; height: 6px; border: 2px solid var(--background); border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(200,255,98,.65); }

nav { display: flex; gap: 36px; }
nav a { color: var(--muted); font-size: 13px; text-decoration: none; transition: color .2s; }
nav a:hover { color: var(--ink); }

.status { justify-self: end; display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: pulse 2s infinite; }

.hero {
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
  padding: 9vh 0;
}

.eyebrow, .section-label { color: var(--accent); font-family: "DM Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .18em; }
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 30px; }
.eyebrow span, .section-label span { color: var(--dim); }

h1, h2 { margin: 0; font-family: "Playfair Display", serif; font-weight: 600; letter-spacing: -.055em; }
h1 { max-width: 1000px; font-size: clamp(58px, 7.4vw, 118px); line-height: .9; }
h1 em, h2 em { color: transparent; font-style: italic; -webkit-text-stroke: 1px var(--ink); }

.hero-intro { max-width: 720px; margin: 42px 0 34px; color: var(--muted); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.7; }
.hero-intro strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 34px; padding: 15px 19px 15px 22px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; transition: transform .25s, background .25s, border-color .25s, box-shadow .25s; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: #0b0d0b; background: var(--accent); }
.button-primary:hover { box-shadow: 0 14px 40px rgba(200,255,98,.16); }
.button-ghost { border-color: var(--line); color: var(--muted); }
.button-ghost:hover { color: var(--ink); border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.03); }

.hero-card { position: relative; border: 1px solid var(--line); background: rgba(17,20,16,.8); box-shadow: 0 40px 100px rgba(0,0,0,.25); transform: rotate(1.5deg); transition: transform .4s, border-color .4s; backdrop-filter: blur(12px); }
.hero-card:hover { transform: rotate(0deg) translateY(-5px); border-color: rgba(200,255,98,.25); }
.hero-card::after { content: ""; position: absolute; inset: 16px -16px -16px 16px; z-index: -1; border: 1px solid rgba(200,255,98,.12); }
.profile-heading { display: flex; align-items: center; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.profile-heading > div:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.profile-heading strong { font-size: 14px; font-weight: 600; }
.profile-heading span { color: var(--muted); font: 9px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.profile-avatar { padding-top: 0.4rem; flex: 0 0 68px; width: 68px; height: 68px; overflow: hidden; border: 1px solid rgba(200,255,98,.35); border-radius: 50%; background: radial-gradient(circle at 50% 30%, rgba(200,255,98,.2), rgba(17,20,16,.92) 70%); box-shadow: 0 0 0 5px rgba(200,255,98,.04); }
.profile-avatar img { width: 100%; height: 100%; object-fit: contain; object-position: center top; filter: saturate(.92) contrast(1.03); }
.terminal-bar { height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.terminal-bar > span { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.terminal-bar > span:nth-child(3) { background: var(--accent); }
.terminal-bar code { margin-left: auto; color: var(--dim); font: 10px "DM Mono", monospace; }
.hero-card pre { overflow: auto; margin: 0; padding: 30px; color: var(--muted); font: clamp(11px, .9vw, 14px)/1.9 "DM Mono", monospace; }
.hero-card .key { color: #d5a9ff; }
.hero-card .value { color: var(--ink); }
.hero-card .accent { color: var(--accent); }
.card-footer { display: flex; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--dim); font: 9px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .12em; }
.card-footer .blink { color: var(--accent); }

.marquee { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; padding: 18px 0; border-block: 1px solid var(--line); background: var(--accent); color: #0b0d0b; }
.marquee div { display: flex; width: max-content; align-items: center; animation: marquee 28s linear infinite; }
.marquee span { font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.marquee b { margin: 0 28px; font-size: 11px; }

.section { display: grid; grid-template-columns: minmax(150px, .28fr) 1fr; gap: clamp(40px, 6vw, 100px); padding: clamp(100px, 13vw, 190px) 0; border-bottom: 1px solid var(--line); }
.section-label { display: flex; align-items: flex-start; gap: 18px; padding-top: 12px; }
.section-label p { margin: 0; color: var(--muted); }
.section h2 { font-size: clamp(48px, 6vw, 94px); line-height: .98; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 60px; }
.about-grid p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.skills { display: flex; flex-wrap: wrap; gap: 9px; margin: 50px 0 0; padding: 0; list-style: none; }
.skills li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 99px; color: #c6c7c0; font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; transition: color .2s, border-color .2s, background .2s; }
.skills li:hover { color: var(--accent); border-color: rgba(200,255,98,.3); background: var(--accent-soft); }

.work { align-items: start; }
.project-list { display: grid; gap: clamp(24px, 3vw, 42px); }
.project { display: block; overflow: hidden; border: 1px solid var(--line); color: var(--ink); background: linear-gradient(135deg, rgba(200,255,98,.075), transparent 55%), var(--panel); text-decoration: none; transition: border-color .3s, transform .3s, box-shadow .3s; }
.project:hover { border-color: rgba(200,255,98,.4); transform: translateY(-6px); box-shadow: 0 35px 100px rgba(0,0,0,.3); }
.project-topline { display: flex; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .1em; }
.project-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: end; min-height: 370px; padding: clamp(34px, 5vw, 72px); }
.project-kicker { margin: 0 0 14px; color: var(--accent); font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .15em; }
.project h2 { font-size: clamp(70px, 9vw, 140px); line-height: .8; }
.project h2 span { color: var(--accent); font-style: italic; }
.project-description { margin: 0; color: var(--muted); line-height: 1.75; }
.project-flow { display: flex; align-items: center; justify-content: space-between; padding: 22px 30px; border-top: 1px solid var(--line); color: var(--muted); font: 9px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .09em; }
.project-flow i { color: var(--accent); font-style: normal; }

.principle-list { border-top: 1px solid var(--line); }
.principle-list article { display: grid; grid-template-columns: 60px minmax(220px, .8fr) 1fr; gap: 30px; align-items: center; padding: 34px 0; border-bottom: 1px solid var(--line); }
.principle-list article > span { color: var(--accent); font: 10px "DM Mono", monospace; }
.principle-list h3 { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(24px, 2.2vw, 34px); font-weight: 600; letter-spacing: -.03em; }
.principle-list p { margin: 0; color: var(--muted); line-height: 1.6; }

.contact { grid-template-columns: 1fr 1fr; min-height: 75vh; align-items: center; }
.contact h2 { margin-bottom: 45px; }
.email { display: inline-flex; gap: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--accent); color: var(--accent); font: clamp(12px, 1.1vw, 15px) "DM Mono", monospace; text-decoration: none; }
.socials { border-top: 1px solid var(--line); }
.socials a { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 25px; padding: 27px 5px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .25s, background .25s; }
.socials a:hover { padding-inline: 18px; background: var(--accent-soft); }
.socials span { font-family: "Playfair Display", serif; font-size: 25px; }
.socials small { color: var(--muted); }
.socials b { color: var(--accent); font-weight: 400; }

footer { min-height: 110px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: var(--muted); font-size: 11px; }
footer p { font-family: "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
footer > span { justify-self: end; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 4px var(--accent); } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee div, .status i { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 1000px) {
  :root { --page: calc(100vw - 48px); }
  .hero { grid-template-columns: 1fr; padding: 90px 0 110px; }
  .hero-card { max-width: 580px; margin-left: auto; }
  .section { grid-template-columns: 1fr; }
  .section-label { padding-top: 0; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --page: calc(100vw - 36px); }
  .site-header { height: 82px; grid-template-columns: 1fr auto; }
  nav { display: none; }
  .status { font-size: 0; }
  .status i { width: 8px; height: 8px; }
  .hero { min-height: auto; padding: 80px 0 100px; }
  h1 { font-size: clamp(48px, 14vw, 72px); }
  .hero-intro { margin-top: 30px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-card { width: calc(100% - 12px); margin: 25px 12px 0 0; transform: none; }
  .hero-card pre { padding: 24px 18px; font-size: 10px; }
  .section { gap: 48px; padding: 100px 0; }
  .section h2 { font-size: clamp(45px, 13vw, 70px); }
  .about-grid, .project-body { grid-template-columns: 1fr; gap: 28px; }
  .about-grid { margin-top: 42px; }
  .project-body { min-height: 410px; padding: 36px 24px; }
  .project-flow { overflow-x: auto; gap: 16px; }
  .project-flow span { white-space: nowrap; }
  .principle-list article { grid-template-columns: 35px 1fr; }
  .principle-list article p { grid-column: 2; }
  .socials a { grid-template-columns: 1fr auto; }
  .socials small { display: none; }
  .email { max-width: 100%; font-size: 11px; overflow-wrap: anywhere; }
  footer { grid-template-columns: 1fr 1fr; padding: 35px 0; }
  footer p { display: none; }
}
