:root {
  --bg: #070707;
  --bg-elev: #0c0c0c;
  --bg-card: #101010;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f4;
  --muted: #8d8d8d;
  --accent: #3ef08a;
  --accent-2: #2bc46e;
  --accent-soft: rgba(62, 240, 138, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --header: 76px;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: calc(88px + env(safe-area-inset-top, 0px));
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(62, 240, 138, 0.08), transparent 55%),
    radial-gradient(700px 400px at 100% 8%, rgba(62, 240, 138, 0.04), transparent 50%);
  z-index: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

ul {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #06140c;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  background: var(--accent);
  color: #06140c;
  padding: 8px 12px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 16px;
}

.page-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 240, 138, 0.09), transparent 62%);
  z-index: 1;
  opacity: 0;
  will-change: transform;
}

.site-header,
main,
.site-footer,
.back-top,
.nav-mobile {
  position: relative;
  z-index: 2;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--header) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
}

.site-header.is-scrolled {
  background: rgba(7, 7, 7, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  transition: border-color 0.3s, color 0.3s;
}

.logo:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-desktop {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 0.92rem;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  touch-action: manipulation;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), top 0.3s;
}

.nav-toggle span:first-child {
  top: 17px;
}

.nav-toggle span:last-child {
  top: 24px;
}

.nav-toggle.is-open span:first-child {
  top: 20.5px;
  transform: rotate(45deg);
}

.nav-toggle.is-open span:last-child {
  top: 20.5px;
  transform: rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: calc(var(--header) + env(safe-area-inset-top, 0px)) 0 0 0;
  background: rgba(7, 7, 7, 0.97);
  padding: 28px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  gap: 4px;
  z-index: 35;
  overflow-y: auto;
}

.nav-mobile .nav-link {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7vw, 2rem);
  color: var(--text);
  padding: 14px 0;
  min-height: 48px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: #06140c;
}

.btn-primary:hover {
  background: #62f6a2;
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero */

.hero {
  min-height: calc(100vh - var(--header));
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  align-content: center;
  position: relative;
  padding: 48px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-grid > *,
.projects-grid > *,
.about-grid > *,
.contact-grid > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--accent);
  letter-spacing: 0.08em;
}

.hero-kicker {
  margin-bottom: 22px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(62, 240, 138, 0.7);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(62, 240, 138, 0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-size: clamp(3rem, 7vw, 5.6rem);
}

.hero-line {
  display: block;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-role {
  color: var(--text);
  margin-top: 6px;
}

.hero-lead {
  max-width: 28ch;
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-visual {
  perspective: 1400px;
  min-width: 0;
  max-width: 100%;
}

.laptop {
  transform: rotateX(8deg) rotateY(-18deg) rotateZ(2deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.55));
  will-change: transform;
}

.laptop-lid {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px 16px 10px 10px;
  padding: 10px 10px 8px;
}

.laptop-bezel {
  background: #0b0b0b;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1d1d1d;
}

.editor-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 8px;
  background: #111;
  border-bottom: 1px solid #1e1e1e;
}

.editor-dots {
  display: flex;
  gap: 5px;
}

.editor-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a2a2a;
}

.editor-dots span:nth-child(1) { background: #ff5f57; }
.editor-dots span:nth-child(2) { background: #febc2e; }
.editor-dots span:nth-child(3) { background: #28c840; }

.editor-tabs {
  display: flex;
  gap: 8px;
  font-size: 0.7rem;
  color: #6b6b6b;
}

.editor-tabs .is-on {
  color: var(--accent);
}

.editor-code {
  margin: 0;
  padding: 14px 12px 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1.7;
  color: #c8c8c8;
  min-height: 280px;
  overflow: hidden;
  background:
    linear-gradient(#0e0e0e, #0e0e0e) padding-box,
    linear-gradient(180deg, rgba(62, 240, 138, 0.08), transparent 40%) border-box;
}

.editor-code .ln {
  display: inline-block;
  width: 22px;
  color: #3f3f3f;
  user-select: none;
}

.tok-tag { color: #7ee0a8; }
.tok-attr { color: #9ad4ff; }
.tok-str { color: #e8d48a; }
.tok-sel { color: #c3a6ff; }
.tok-prop { color: #9ad4ff; }
.tok-val { color: #3ef08a; }
.tok-fn { color: #f0c36e; }

.caret {
  display: inline-block;
  width: 7px;
  height: 0.95em;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.laptop-base {
  height: 14px;
  margin: 0 -18px;
  background: linear-gradient(#2a2a2a, #161616);
  border-radius: 0 0 18px 18px;
  border: 1px solid #333;
  border-top: 0;
  position: relative;
}

.laptop-indent {
  width: 86px;
  height: 5px;
  margin: 3px auto 0;
  background: #0c0c0c;
  border-radius: 0 0 8px 8px;
}

.scroll-hint {
  position: absolute;
  left: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--accent), transparent);
  animation: drip 2s infinite;
}

@keyframes drip {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

/* Sections */

.section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 120px 0 40px;
}

.section-head {
  margin-bottom: 56px;
  max-width: 640px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: 14px;
}

.section-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.project-card {
  display: block;
}

.project-card article {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  will-change: transform;
  transition: transform 0.45s var(--ease), border-color 0.35s, box-shadow 0.45s;
}

.project-card:hover article {
  transform: translateY(-8px);
  border-color: rgba(62, 240, 138, 0.35);
  box-shadow: var(--shadow);
}

.project-preview {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #080808;
  border-bottom: 1px solid var(--line);
}

.browser {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #161616;
  flex-shrink: 0;
}

.browser-bar > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2c2c2c;
}

.browser-url {
  margin-left: 8px;
  flex: 1;
  min-width: 0;
  background: #0d0d0d;
  border-radius: 999px;
  font-size: 0.68rem;
  color: #6a6a6a;
  padding: 4px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.site-photo {
  padding: 0;
  background: #050505;
}

.project-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.project-card:hover .site {
  transform: scale(1.03);
}

.site {
  transition: transform 0.7s var(--ease);
  transform-origin: top center;
}

.project-body {
  padding: 22px 24px 26px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.project-meta span:first-child {
  color: var(--accent);
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.project-body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.98rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 500;
}

.project-link span {
  transition: transform 0.3s var(--ease);
}

.project-card:hover .project-link span {
  transform: translateX(6px);
}

/* Mini sites */

.site-fitness {
  background: #0a0a0a;
  color: #eee;
  padding: 14px 16px;
}

.fit-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.fit-nav strong {
  color: #fff;
  margin-right: auto;
}

.fit-nav em {
  font-style: normal;
  background: #c8ff3d;
  color: #111;
  padding: 4px 8px;
  border-radius: 999px;
}

.fit-hero {
  margin-top: 22px;
}

.fit-hero p {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: #c8ff3d;
}

.fit-hero h4 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 0.95;
  margin: 8px 0 14px;
}

.fit-cta {
  display: inline-block;
  background: #c8ff3d;
  color: #111;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}

.fit-stats {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fit-stats div {
  background: #141414;
  border: 1px solid #232323;
  border-radius: 10px;
  padding: 8px;
}

.fit-stats b {
  display: block;
  font-size: 0.95rem;
}

.fit-stats small {
  color: #888;
  font-size: 0.62rem;
}

.site-matcha {
  background: #efe8d8;
  color: #243022;
  padding: 14px 16px;
}

.mat-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mat-nav strong {
  margin-right: auto;
}

.mat-nav em {
  font-style: normal;
}

.mat-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}

.mat-copy p {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5f704c;
}

.mat-copy h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
  margin: 6px 0 10px;
}

.mat-copy span {
  font-size: 0.7rem;
  border-bottom: 1px solid #243022;
  padding-bottom: 2px;
}

.mat-tin {
  width: 78px;
  height: 92px;
  margin-left: auto;
  border-radius: 12px 12px 8px 8px;
  background:
    linear-gradient(#6f8a4a, #3d5428);
  box-shadow: inset 0 0 0 6px #d7c9a4;
}

.mat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.mat-item {
  background: #e4dcc8;
  border-radius: 10px;
  padding: 8px;
  font-size: 0.62rem;
}

.mat-item i {
  display: block;
  height: 28px;
  border-radius: 6px;
  background: #6b8448;
  margin-bottom: 6px;
}

.mat-item:nth-child(2) i { background: #8aa25e; }
.mat-item:nth-child(3) i { background: #4e6634; }

.site-wash {
  background: linear-gradient(180deg, #07131d, #0c1c2a 55%, #102433);
  color: #e8f4ff;
  padding: 14px 16px;
}

.wash-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8aa4b8;
}

.wash-nav strong {
  color: #fff;
  margin-right: auto;
}

.wash-nav em {
  font-style: normal;
  color: #111;
  background: #7ee0ff;
  padding: 4px 8px;
  border-radius: 999px;
}

.wash-hero {
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.wash-hero p {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: #7ee0ff;
}

.wash-hero h4 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 0.98;
  margin: 8px 0 12px;
}

.wash-pills {
  display: flex;
  gap: 6px;
}

.wash-pills span {
  font-size: 0.62rem;
  border: 1px solid #2a4a60;
  padding: 4px 8px;
  border-radius: 999px;
}

.wash-car {
  position: absolute;
  right: -10px;
  bottom: 8px;
  width: 170px;
  height: 54px;
  background: #9ec5d8;
  border-radius: 40px 80px 12px 20px;
  opacity: 0.35;
}

.wash-car::before {
  content: "";
  position: absolute;
  left: 34px;
  top: -22px;
  width: 90px;
  height: 28px;
  background: #7aa8bd;
  border-radius: 18px 28px 0 0;
}

.site-clinic {
  background: #f4f7f8;
  color: #17333a;
  padding: 14px 16px;
}

.cli-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5d7378;
}

.cli-nav strong {
  margin-right: auto;
  color: #0f6e73;
}

.cli-nav em {
  font-style: normal;
  background: #0f6e73;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
}

.cli-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin-top: 18px;
}

.cli-hero p:first-child {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f6e73;
}

.cli-hero h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.05;
  margin: 6px 0 10px;
}

.cli-cta {
  display: inline-block;
  font-size: 0.68rem;
  background: #0f6e73;
  color: #fff;
  padding: 6px 9px;
  border-radius: 999px;
}

.cli-panel {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(15, 50, 55, 0.08);
}

.cli-panel small {
  color: #6a8084;
  font-size: 0.6rem;
}

.cli-panel b {
  display: block;
  font-size: 0.95rem;
  margin: 4px 0;
}

.cli-panel p {
  font-size: 0.68rem;
  color: #4d6468;
}

.cli-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.cli-row span {
  background: #e4eef0;
  font-size: 0.62rem;
  padding: 6px 8px;
  border-radius: 8px;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.portrait-frame {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.portrait-art {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background:
    radial-gradient(500px 280px at 20% 0%, rgba(62, 240, 138, 0.16), transparent 55%),
    linear-gradient(180deg, #141414, #0b0b0b);
  position: relative;
}

.portrait-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(#000, transparent 85%);
}

.portrait-mono {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 7.5rem);
  line-height: 0.8;
  letter-spacing: -0.08em;
  position: relative;
}

.portrait-rule {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 22px 0 16px;
  position: relative;
}

.portrait-note {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.portrait-caption {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.portrait-caption span:first-child {
  color: var(--text);
}

.about-copy p {
  font-size: 1.12rem;
  color: #cfcfcf;
  font-weight: 300;
  max-width: 46ch;
}

.about-highlights {
  display: grid;
  gap: 12px;
  margin: 32px 0 36px;
}

.about-highlights li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.hi-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

/* Skills */

.skills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}

.skills-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  transition: border-color 0.3s;
}

.skills-list li:hover {
  border-color: rgba(62, 240, 138, 0.35);
}

.skill-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
}

.skill-mark svg {
  width: 22px;
  height: 22px;
}

.skills-list strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.skills-list p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.contact-intro {
  color: #cfcfcf;
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 36ch;
}

.contact-channels {
  margin-top: 32px;
  display: grid;
  gap: 22px;
}

.contact-channels span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-channels a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-channels a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.25s;
  font-size: 16px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 128px;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--accent);
}

.form-status.is-error {
  color: #ff8b8b;
}

.contact-form .btn {
  justify-self: start;
}

/* Footer */

.site-footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 80px auto 0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--accent);
}

.back-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(16, 16, 16, 0.9);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}

.back-top svg {
  width: 18px;
  height: 18px;
}

.back-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* Inner pages */

.page-hero {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 32px;
}

.page-hero a {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero a:hover {
  color: var(--accent);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 18px 0 12px;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.case-frame {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-card);
}

.case-copy {
  width: min(720px, calc(100% - 48px));
  margin: 40px auto 80px;
}

.case-copy p {
  color: #cfcfcf;
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 16px;
}

.case-copy h2 {
  font-family: var(--font-display);
  margin: 28px 0 10px;
}

.preview-full .site {
  min-height: 520px;
  transform: none;
}

.preview-full .browser {
  min-height: 560px;
}

.cv-sheet {
  width: min(820px, calc(100% - 48px));
  margin: 40px auto 80px;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 48px;
}

.cv-sheet h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: -0.04em;
}

.cv-sheet .role {
  color: var(--accent);
  margin: 6px 0 24px;
}

.cv-sheet h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cv-sheet p,
.cv-sheet li {
  color: #cfcfcf;
  font-weight: 300;
}

.cv-sheet ul {
  display: grid;
  gap: 8px;
  padding-left: 0;
}

.cv-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

@media print {
  .site-header,
  .back-top,
  .cv-actions,
  .page-grain,
  .cursor-glow {
    display: none !important;
  }

  body,
  .cv-sheet {
    background: #fff;
    color: #111;
  }

  .cv-sheet {
    border: 0;
    width: 100%;
    padding: 0;
  }

  .cv-sheet p,
  .cv-sheet li {
    color: #222;
  }
}

/* Responsive */

@media (max-width: 1100px) {
  .header-inner,
  .hero,
  .section,
  .site-footer,
  .page-hero {
    width: min(var(--max), calc(100% - 40px));
  }

  .hero-grid {
    gap: 32px;
  }

  .nav-desktop {
    gap: 18px;
  }

  .contact-grid,
  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 900px) {
  :root {
    --header: 68px;
  }

  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-mobile:not([hidden]) {
    display: flex;
  }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 32px 0 80px;
  }

  .hero-copy {
    order: 0;
  }

  .hero-visual {
    order: 1;
    max-width: 560px;
    margin: 8px auto 0;
  }

  .laptop {
    transform: rotateX(6deg) rotateY(-8deg);
  }

  .about-portrait {
    max-width: 420px;
  }

  .section {
    padding: 88px 0 28px;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .contact-form .btn {
    width: 100%;
    justify-self: stretch;
  }

  .cursor-glow {
    display: none;
  }
}

@media (max-width: 760px) {
  .projects-grid {
    gap: 20px;
  }

  .skills-list {
    gap: 12px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 11vw, 3.6rem);
  }

  .hero-lead {
    font-size: 1.05rem;
    max-width: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .cv-sheet {
    width: min(820px, calc(100% - 32px));
    padding: 28px 22px;
  }

  .page-hero {
    padding-top: 32px;
  }

  .preview-full .site,
  .preview-full .browser {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero,
  .section,
  .site-footer,
  .page-hero {
    width: min(var(--max), calc(100% - 28px));
  }

  .projects-grid,
  .skills-list {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 20px 0 72px;
  }

  .section {
    padding: 72px 0 16px;
  }

  .section-head h2 {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .project-preview {
    aspect-ratio: 16 / 10;
  }

  .project-body {
    padding: 18px 18px 22px;
  }

  .project-body h3 {
    font-size: 1.25rem;
  }

  .laptop {
    transform: none;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.4));
  }

  .laptop-base {
    margin: 0 -8px;
  }

  .editor-code {
    font-size: 0.58rem;
    min-height: 200px;
    padding: 10px 8px 14px;
  }

  .editor-code .ln {
    width: 16px;
  }

  .editor-tabs span:last-child {
    display: none;
  }

  .scroll-hint {
    bottom: 16px;
  }

  .portrait-art {
    aspect-ratio: 5 / 4;
    padding: 24px;
  }

  .portrait-caption {
    flex-wrap: wrap;
    gap: 4px;
  }

  .contact-form {
    padding: 20px;
    border-radius: 18px;
  }

  .about-copy p {
    font-size: 1.02rem;
  }
}

@media (max-width: 420px) {
  .hero-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .btn {
    min-height: 46px;
    padding: 0 16px;
  }

  .project-meta {
    gap: 8px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 20px 0 48px;
  }

  .hero-visual {
    max-width: 380px;
  }

  .editor-code {
    min-height: 160px;
  }

  .scroll-hint {
    display: none;
  }
}

@media (hover: none) {
  .project-card:hover article {
    transform: none;
    box-shadow: none;
  }

  .project-card:hover .site {
    transform: none;
  }

  .btn-primary:hover,
  .btn-ghost:hover,
  .back-top:hover {
    transform: none;
  }

  .project-card:active article {
    transform: translateY(-4px);
    border-color: rgba(62, 240, 138, 0.35);
  }

  .btn-primary:active {
    background: #62f6a2;
  }

  .btn-ghost:active {
    border-color: var(--accent);
    color: var(--accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .laptop {
    transform: none;
  }
}
