/* Portfolio styles. Colors live in :root; body.light overrides them. */

@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700;800&display=swap");

/* Theme tokens */
:root {
  --bg: #080b12;
  --surface: #101620;
  --surface2: #151e2b;
  --line: #263241;
  --text: #eef4f5;
  --muted: #9baab9;
  --accent: #a5f3d2;
  --accent-soft: rgba(165, 243, 210, 0.11);
  --purple: #b8b5ff;
  --shadow: 0 20px 60px #0004;
  color-scheme: dark;
}
body.light {
  --bg: #f6f8f7;
  --surface: #fff;
  --surface2: #eef3f1;
  --line: #d6dfdc;
  --text: #182824;
  --muted: #5b6d68;
  --accent: #116f56;
  --accent-soft: rgba(17, 111, 86, 0.08);
  --purple: #6653b0;
  --shadow: 0 20px 60px #24453615;
  color-scheme: light;
}
/* Base */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 95px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
  transition:
    background 0.35s,
    color 0.35s;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
.container {
  max-width: 1150px;
  margin: auto;
  padding: 0 32px;
}
.mono,
.eyebrow,
.chip,
.tiny,
.filter,
.kicker {
  font-family: "DM Mono", monospace;
}
/* Navigation */
.topbar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid transparent;
  transition: 0.25s;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
  border-color: var(--line);
}
.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.09em;
}
.brand b {
  color: var(--accent);
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
}
.navlinks a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.navlinks a:hover,
.navlinks a.active {
  color: var(--accent);
}
.navright {
  display: flex;
  gap: 9px;
  align-items: center;
}
.iconbtn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.iconbtn:hover {
  border-color: var(--accent);
}
.menubtn {
  display: none;
}
/* Hero */
.hero {
  position: relative;
  min-height: 790px;
  display: flex;
  align-items: center;
  padding: 150px 0 105px;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  right: -260px;
  top: -170px;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(82, 148, 137, 0.13),
    transparent 65%
  );
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dot {
  height: 7px;
  width: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--accent-soft);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.hero h1 {
  font-size: clamp(56px, 8vw, 105px);
  letter-spacing: -0.085em;
  line-height: 1.03;
  font-weight: 800;
  max-width: 850px;
  margin: 32px 0 27px;
}
.hero-subline {
  font-size: 0.66em;
  letter-spacing: -0.075em;
  display: inline-block;
  margin-top: 0.12em;
}
.hero h1 .gradient {
  background: linear-gradient(110deg, var(--accent), var(--purple));
  color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 18px;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 35px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  transition:
    transform 0.2s,
    border 0.2s,
    background 0.2s;
}
.btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
body.light .btn.primary {
  color: white;
}
.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 105px;
  gap: 15px;
}
.hero-bottom span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.09em;
}
.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scroll-line {
  width: 45px;
  height: 1px;
  background: var(--accent);
}
.orbital {
  position: absolute;
  right: -60px;
  top: 170px;
  width: 450px;
  height: 450px;
  border: 1px solid rgba(165, 243, 210, 0.09);
  border-radius: 50%;
  pointer-events: none;
}
.orbital:before,
.orbital:after {
  content: "";
  position: absolute;
  inset: 45px;
  border: 1px dashed rgba(165, 243, 210, 0.12);
  border-radius: 50%;
}
.orbital:after {
  inset: 125px;
  border-style: solid;
}
.orbit-dot {
  position: absolute;
  left: 13%;
  top: 12%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 28px var(--accent);
}
/* Shared section layout */
section {
  padding: 108px 0;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 38px;
}
.kicker {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-heading h2 {
  font-size: clamp(34px, 4.4vw, 55px);
  line-height: 1.12;
  letter-spacing: -0.065em;
  margin: 0;
}
.section-heading > p {
  font-size: 13px;
  color: var(--muted);
  max-width: 260px;
  text-align: right;
  margin: 0;
}
/* Project grid and cards */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 11px;
  transition: 0.2s;
}
.filter:hover {
  color: var(--text);
  border-color: var(--accent);
}
.filter.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  padding: 27px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}
.project:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: var(--shadow);
}
.project[hidden] {
  display: none;
}
.project-visual {
  height: 137px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -27px -27px 25px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      ellipse at 50% 115%,
      rgba(165, 243, 210, 0.16),
      transparent 70%
    ),
    linear-gradient(120deg, var(--surface2), var(--surface));
}
.project-visual:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      to right,
      rgba(165, 243, 210, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(165, 243, 210, 0.045) 1px,
      transparent 1px
    );
  background-size: 25px 25px;
  mask-image: linear-gradient(to top, #000, transparent);
}
.visual-mark {
  position: relative;
  font:
    700 36px "DM Mono",
    monospace;
  letter-spacing: -0.1em;
  color: var(--accent);
  text-shadow: 0 0 40px rgba(165, 243, 210, 0.3);
}
.visual-mark.purple {
  color: var(--purple);
}
.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.chip {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}
.project h3 {
  font-size: 23px;
  letter-spacing: -0.05em;
  margin: 10px 0;
}
.project p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 23px;
}
.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tag {
  font:
    10px "DM Mono",
    monospace;
  padding: 5px 9px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
}
.project-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 17px;
  align-self: flex-start;
}
/* Experience timeline */
.timeline {
  margin-top: 18px;
}
.entry {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.entry:last-child {
  border: 0;
}
.entry-date {
  font:
    12px "DM Mono",
    monospace;
  color: var(--muted);
  padding-top: 6px;
}
.entry h3 {
  font-size: 23px;
  letter-spacing: -0.045em;
  margin-bottom: 4px;
}
.entry-org {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 13px;
}
.entry p {
  font-size: 14px;
  max-width: 710px;
  color: var(--muted);
  margin: 0;
}
/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 70px;
  align-items: start;
}
.about-copy {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.95;
}
.about-copy strong {
  color: var(--text);
}
.facts {
  display: grid;
  gap: 12px;
}
.fact {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 19px 21px;
  border-radius: 10px;
}
.fact-label {
  font:
    10px "DM Mono",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  margin-bottom: 6px;
}
.fact-value {
  font-size: 14px;
  font-weight: 700;
}
/* Contact */
.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  padding: 65px;
}
.contact-card:after {
  content: "↗";
  position: absolute;
  right: 60px;
  top: 25px;
  font-size: 160px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.07;
  pointer-events: none;
}
.contact-card h2 {
  font-size: clamp(40px, 6vw, 70px);
  letter-spacing: -0.07em;
  line-height: 1.1;
  max-width: 730px;
  margin: 12px 0 18px;
}
.contact-card > p:not(.kicker) {
  color: var(--muted);
  max-width: 560px;
  font-size: 15px;
}
/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 32px 0 45px;
  font-size: 12px;
  color: var(--muted);
}
.footer a:hover {
  color: var(--accent);
}
.footer-links {
  display: flex;
  gap: 22px;
}
/* Scroll reveal and cursor glow */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.cursor-glow {
  position: fixed;
  pointer-events: none;
  width: 500px;
  height: 500px;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(110, 212, 177, 0.045),
    transparent 65%
  );
  z-index: 0;
}
/* Quick navigation palette (Ctrl+K) */
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: #0009;
  z-index: 70;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 18vh 20px;
}
.palette-backdrop.open {
  display: flex;
}
.palette {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 30px 90px #0007;
  overflow: hidden;
}
.palette input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  padding: 22px;
  font:
    15px "DM Sans",
    sans-serif;
  outline: 0;
}
.palette-items {
  padding: 10px;
  max-height: 330px;
  overflow: auto;
}
.palette-items button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 13px;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
}
.palette-items button:hover,
.palette-items button:focus {
  background: var(--surface2);
}
.palette-items small {
  color: var(--muted);
}
.palette-help {
  border-top: 1px solid var(--line);
  padding: 10px 20px;
  font:
    10px "DM Mono",
    monospace;
  color: var(--muted);
}
/* Responsive layout */
@media (max-width: 800px) {
  .navlinks {
    display: none;
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    background: var(--surface);
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: start;
  }
  .navlinks.open {
    display: flex;
  }
  .menubtn {
    display: grid;
  }
  .hero {
    min-height: 710px;
  }
  .orbital {
    opacity: 0.35;
    right: -240px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .entry {
    grid-template-columns: 145px 1fr;
  }
}
@media (max-width: 620px) {
  .container {
    padding: 0 21px;
  }
  .hero {
    padding: 150px 0 60px;
    min-height: 700px;
  }
  .hero h1 {
    font-size: clamp(52px, 12vw, 74px);
  }
  .hero-desc {
    font-size: 16px;
  }
  .hero-bottom {
    margin-top: 90px;
  }
  .projects {
    grid-template-columns: 1fr;
  }
  .section-heading {
    display: block;
  }
  .section-heading > p {
    text-align: left;
    margin-top: 15px;
  }
  .entry {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .entry h3 {
    font-size: 21px;
  }
  section {
    padding: 75px 0;
  }
  .contact-card {
    padding: 35px 26px;
  }
  .footer {
    flex-direction: column;
  }
  .nav {
    height: 70px;
  }
}
/* Honor the user's motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .cursor-glow {
    display: none;
  }
}

/* Expandable project notes and screenshots */
.project-detail {
  margin: 17px 0 5px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.035);
}
.project-detail summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
  list-style-position: inside;
}
.project-detail[open] summary {
  margin-bottom: 12px;
}
.project-detail strong {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}
.project-detail p {
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  color: var(--muted);
}
.secondary-link {
  margin-left: 14px;
  opacity: 0.8;
  font-size: 12px;
}
.project-detail summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.project-visual.altcv-shot {
  height: 190px;
  background: #eef4ff;
}
.project-visual.altcv-shot:before {
  display: none;
}
.altcv-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.45s ease;
}
.project:hover .altcv-shot img {
  transform: scale(1.035);
}
.altcv-caption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
@media (max-width: 650px) {
  .project-visual.altcv-shot {
    height: 165px;
  }
}
