:root {
  --bg: #0a0e13;
  --bg-alt: #10161d;
  --bg-card: #131b23;
  --line: #202b35;
  --text: #dbe4ec;
  --muted: #6d7b89;
  --amber: #ffb454;
  --amber-dim: #b8823c;
  --cyan: #5fd6c4;
  --cyan-dim: #3d8f82;

  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --font-sans: 'Inter', system-ui, sans-serif;

  --container: 1080px;
}

* { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint CRT scanline overlay for texture, very subtle */
.scan-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

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

h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 60px);
  background: rgba(10, 14, 19, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo .at { color: var(--amber); }
.nav-logo .colon { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.nav-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amber); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 40px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  color: var(--text);
}
.hero h1 .highlight { color: var(--amber); }

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 20px auto 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  display: inline-block;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--amber);
  color: #16110a;
  font-weight: 500;
}
.btn-primary:hover { background: #ffc670; }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}
.scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollpulse 2s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---------- Sections ---------- */

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 90px 24px;
}

.section-head { margin-bottom: 48px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}
.tag-amber { color: var(--amber); }
.tag-cyan { color: var(--cyan); }

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 500;
  color: var(--text);
}

/* about */

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

.about-copy {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 42ch;
}

.skill-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.skill-col-title {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.skill-col-title.amber { color: var(--amber); }
.skill-col-title.cyan { color: var(--cyan); }

.skill-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text);
}
.skill-col li {
  padding-left: 16px;
  position: relative;
  color: var(--muted);
}
.skill-col li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--amber-dim);
}

/* dividers */

.divider {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  opacity: 0.8;
}
.divider-svg { width: 100%; height: 40px; display: block; }

/* project cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--amber-dim);
  transform: translateY(-3px);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--text);
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.card-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  border-radius: 20px;
  padding: 3px 10px;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--amber);
  margin-top: 8px;
}
.card-link:hover { text-decoration: underline; }

/* contact */

.section-contact { padding-bottom: 120px; }

.contact-terminal {
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.terminal-bar .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.terminal-bar .dot:nth-child(1) { background: #e0625a; }
.terminal-bar .dot:nth-child(2) { background: var(--amber-dim); }
.terminal-bar .dot:nth-child(3) { background: var(--cyan-dim); }

.terminal-body {
  padding: 22px 24px 26px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.terminal-body p { margin: 0 0 10px; }
.prompt { color: var(--cyan); margin-right: 8px; }
.terminal-line a { color: var(--text); border-bottom: 1px dotted var(--muted); }
.terminal-line a:hover { color: var(--amber); border-color: var(--amber); }

.cursor-blink {
  color: var(--amber);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* footer */

.footer {
  text-align: center;
  padding: 30px 24px 40px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 480px) {
  .skill-columns { grid-template-columns: 1fr; }
}

/* keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
