:root {
  --ink: #eaf1f4;
  --muted: #aab9c1;
  --line: rgba(174, 210, 216, 0.14);
  --panel: rgba(18, 28, 36, 0.82);
  --teal: #65d6c6;
  --amber: #f4bf72;
  --blue: #87b8ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background-color: #0b1116;
  overflow-x: hidden;
}

.page-shell {
  width: 100%;
  min-height: calc(100 * min(var(--vh, 1vh), 1vh));
  background-image:
    linear-gradient(rgba(114, 169, 181, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 169, 181, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  position: relative;
  isolation: isolate;
}

.page-shell::before {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 82% 10%, rgba(69, 160, 170, 0.15), transparent 26rem),
    radial-gradient(circle at 12% 43%, rgba(43, 82, 125, 0.13), transparent 26rem),
    linear-gradient(180deg, rgba(11, 17, 22, 0.15), #0b1116 72%);
}

.mono { font-family: "Space Mono", monospace; }
.site-width { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
section { scroll-margin-top: 6.5rem; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 22, 0.84);
  backdrop-filter: blur(16px);
}

.nav-link {
  color: #aab9c1;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.nav-link:hover, .nav-link:focus-visible, .nav-link.is-active {
  color: #65d6c6;
  border-color: #65d6c6;
}

.menu-toggle {
  border: 1px solid var(--line);
  background: rgba(19, 31, 40, 0.9);
  color: var(--ink);
  border-radius: 0.55rem;
  padding: 0.45rem;
}

.eyebrow {
  color: #65d6c6;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  font-family: "Space Mono", monospace;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.outline-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(22, 34, 43, 0.9), rgba(13, 21, 27, 0.86));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.terminal-card {
  position: relative;
  overflow: hidden;
}
.terminal-card::after {
  content: "";
  position: absolute;
  width: 10rem;
  height: 10rem;
  border: 1px solid rgba(101, 214, 198, 0.13);
  border-radius: 50%;
  right: -4rem;
  bottom: -4rem;
}

.corner-mark {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-color: rgba(101, 214, 198, 0.55);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  border-radius: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.action-button:hover { transform: translateY(-2px); }
.action-button:focus-visible, .nav-link:focus-visible, .text-link:focus-visible, .menu-toggle:focus-visible, .top-button:focus-visible {
  outline: 3px solid rgba(101, 214, 198, 0.55);
  outline-offset: 3px;
}

.section-rule { height: 1px; background: var(--line); }
.section-heading { font-family: "Space Mono", monospace; letter-spacing: -0.045em; }

.about-copy p + p { margin-top: 1rem; }
.skill-group, .focus-card, .project-card, .contact-panel {
  border: 1px solid var(--line);
  background: rgba(15, 25, 32, 0.72);
  border-radius: 0.75rem;
}

.skill-tag {
  border: 1px solid rgba(174, 210, 216, 0.14);
  background: rgba(134, 184, 255, 0.06);
  color: #d6e4ec;
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.project-card {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(101, 214, 198, 0.48);
  background: rgba(20, 34, 42, 0.94);
}
.project-number {
  color: rgba(101, 214, 198, 0.72);
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
}

.text-link {
  color: #87b8ff;
  text-decoration: underline;
  text-decoration-color: rgba(135, 184, 255, 0.4);
  text-underline-offset: 0.22em;
  transition: color 180ms ease;
}
.text-link:hover { color: #65d6c6; }

.top-button {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(101, 214, 198, 0.4);
  border-radius: 0.7rem;
  background: rgba(15, 27, 34, 0.95);
  color: #65d6c6;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.top-button.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

.reveal { animation: rise 650ms both ease-out; }
.delay-1 { animation-delay: 110ms; }
.delay-2 { animation-delay: 210ms; }
.delay-3 { animation-delay: 310ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.avatar-hero {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 0.85rem;
  object-fit: cover;
  border: 1px solid rgba(101, 214, 198, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.proficiency-bar { width: 100%; }
.proficiency-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}
.proficiency-pct {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  color: #65d6c6;
}
.proficiency-track {
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(174, 210, 216, 0.1);
  border: 1px solid var(--line);
  overflow: hidden;
}
.proficiency-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #65d6c6, #87b8ff);
  transition: width 900ms cubic-bezier(0.4, 0, 0.2, 1);
}
.proficiency-fill.is-filled { width: var(--fill-width, 0%); }

@media (max-width: 767px) {
  .mobile-nav { display: none; }
  .mobile-nav.is-open { display: flex; }
  .hero-title { letter-spacing: -0.065em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
