/* ============================================================
   VARIABLES — change colors/fonts here, they cascade everywhere
   ============================================================ */
:root {
  --bg:        #0D1B2A;   /* dark navy — main background */
  --surface:   #112436;   /* slightly lighter navy — cards, nav */
  --border:    #6B8A1E;   /* deep olive green — dividers, card borders */
  --accent:    #A8C84A;   /* lime green — headings, highlights, buttons */
  --green:     #A8C84A;   /* same lime — links, tags, prompts */
  --text:      #E4EDF5;   /* light steel blue — body text */
  --muted:     #7a90a8;   /* desaturated steel blue — secondary text */
  --font-mono: 'Courier New', Courier, monospace;
  --font-sans: 'Segoe UI', system-ui, sans-serif;
  --radius:    6px;
  --max-width: 1100px;
}

/* ============================================================
   RESET — browsers have default styles that clash; zero them out
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='4' fill='none' stroke='%23A8C84A' stroke-width='1.5'/%3E%3Cline x1='12' y1='1' x2='12' y2='7' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='17' x2='12' y2='23' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='12' x2='7' y2='12' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='17' y1='12' x2='23' y2='12' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23A8C84A'/%3E%3C/svg%3E") 12 12, crosshair;
}

a, button, .btn, .tag, .glitch-wrap, .skill-card, .nav-links a {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='5' fill='none' stroke='%23A8C84A' stroke-width='1.5'/%3E%3Cline x1='12' y1='1' x2='12' y2='7' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='17' x2='12' y2='23' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='12' x2='7' y2='12' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='17' y1='12' x2='23' y2='12' stroke='%23A8C84A' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23A8C84A'/%3E%3C/svg%3E") 12 12, pointer;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.5rem;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.6s ease 0.3s;
}

h2.visible {
  background-size: 100% 1px;
}

h2::before {
  content: '//';
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: text-shadow 0.2s;
}

h2:hover::before {
  text-shadow: 0 0 10px rgba(168, 200, 74, 0.8);
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* ============================================================
   NAVIGATION — vertical sidebar inside hero
   ============================================================ */
nav {
  display: flex;
  align-items: center;
  padding-top: 1.5rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  list-style: none;
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

.nav-links a {
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: color 0.2s, padding-left 0.2s;
  display: block;
}

.nav-links a:hover {
  color: var(--green);
  padding-left: 0.4rem;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
  background-image:
    linear-gradient(rgba(13, 27, 42, 0.55), rgba(13, 27, 42, 0.55)),
    url('../pictures/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Pull hero content flush to the left edge of the container */
#hero .container {
  padding-left: 0;
  max-width: var(--max-width);
}

/* nav | text+image */
.hero-outer {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6rem;
  align-items: start;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.hero-image {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: -6rem;
}

/* ── Image frame — targeting bracket corners ────────────── */
.image-frame {
  position: relative;
  display: inline-flex;
  isolation: isolate;
  z-index: 1;
}

.bracket {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 2;
  pointer-events: none;
  transition: width 0.3s ease, height 0.3s ease;
}

.bracket.tl {
  top: -8px;
  left: -8px;
  border-width: 2px 0 0 2px;
}

.bracket.br {
  bottom: -8px;
  right: -8px;
  border-width: 0 2px 2px 0;
}

.image-frame:hover .bracket {
  width: 40px;
  height: 40px;
}

/* ── Glitch wrapper ─────────────────────────────────────── */
.glitch-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 10px rgba(168, 200, 74, 0.3));
  transition: filter 0.3s;
  z-index: 0;
}

.glitch-wrap:hover {
  filter: drop-shadow(0 0 18px rgba(168, 200, 74, 0.55));
}

.glitch-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* Two colour-shifted copies stacked above the real image */
.glitch-wrap::before,
.glitch-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../pictures/Profile.jpg') center / cover;
  pointer-events: none;
  opacity: 0;
}

.glitch-wrap::before { z-index: 2; }
.glitch-wrap::after  { z-index: 3; }

/* Always active — stop on hover */
.glitch-wrap img     { animation: glitch-img 10s linear infinite; }
.glitch-wrap::before { animation: glitch-r   10s linear infinite; filter: hue-rotate(85deg)  saturate(4) contrast(1.2); }
.glitch-wrap::after  { animation: glitch-b   10s linear infinite; filter: hue-rotate(200deg) saturate(4) contrast(1.2); }

.glitch-wrap:hover img     { animation: none; transform: translate(0, 0); clip-path: inset(0 0 0 0); filter: none; }
.glitch-wrap:hover::before,
.glitch-wrap:hover::after  { animation: none; opacity: 0 !important; }

/* ── Main image: constant tremor + 6 burst episodes ── */
@keyframes glitch-img {
  /* tremor baseline */
  0%   { transform: translate( 1px, 0); clip-path: inset(0 0 0 0); }
  /* BURST 1 */
  4%   { transform: translate(-6px, 0); clip-path: inset( 4% 0 82% 0); }
  6%   { transform: translate( 6px, 0); clip-path: inset(28% 0 52% 0); }
  8%   { transform: translate(-4px, 0); clip-path: inset(65% 0 18% 0); }
  10%  { transform: translate( 2px, 0); clip-path: inset( 0% 0  0% 0); }
  /* tremor */
  13%  { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  16%  { transform: translate( 2px, 0); clip-path: inset(0 0 0 0); }
  /* BURST 2 */
  20%  { transform: translate( 7px, 0); clip-path: inset(12% 0 68% 0); }
  22%  { transform: translate(-7px, 0); clip-path: inset(48% 0 33% 0); }
  24%  { transform: translate( 5px, 0); clip-path: inset(78% 0  6% 0); }
  26%  { transform: translate(-1px, 0); clip-path: inset( 0% 0  0% 0); }
  /* tremor */
  29%  { transform: translate( 1px, 0); clip-path: inset(0 0 0 0); }
  32%  { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  /* BURST 3 */
  36%  { transform: translate(-6px, 0); clip-path: inset( 8% 0 74% 0); }
  38%  { transform: translate( 6px, 0); clip-path: inset(40% 0 40% 0); }
  40%  { transform: translate(-3px, 0); clip-path: inset(72% 0 12% 0); }
  42%  { transform: translate( 1px, 0); clip-path: inset( 0% 0  0% 0); }
  /* longer calm */
  46%  { transform: translate( 0px, 0); clip-path: inset(0 0 0 0); }
  49%  { transform: translate( 1px, 0); clip-path: inset(0 0 0 0); }
  /* BURST 4 */
  53%  { transform: translate( 7px, 0); clip-path: inset(20% 0 62% 0); }
  55%  { transform: translate(-7px, 0); clip-path: inset(55% 0 28% 0); }
  57%  { transform: translate( 4px, 0); clip-path: inset(85% 0  4% 0); }
  59%  { transform: translate(-1px, 0); clip-path: inset( 0% 0  0% 0); }
  /* tremor */
  62%  { transform: translate( 2px, 0); clip-path: inset(0 0 0 0); }
  65%  { transform: translate(-1px, 0); clip-path: inset(0 0 0 0); }
  /* BURST 5 */
  69%  { transform: translate(-8px, 0); clip-path: inset( 5% 0 80% 0); }
  71%  { transform: translate( 8px, 0); clip-path: inset(35% 0 45% 0); }
  73%  { transform: translate(-5px, 0); clip-path: inset(68% 0 15% 0); }
  75%  { transform: translate( 2px, 0); clip-path: inset( 0% 0  0% 0); }
  /* tremor */
  79%  { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  82%  { transform: translate( 1px, 0); clip-path: inset(0 0 0 0); }
  /* BURST 6 */
  86%  { transform: translate( 6px, 0); clip-path: inset(15% 0 70% 0); }
  88%  { transform: translate(-6px, 0); clip-path: inset(50% 0 32% 0); }
  90%  { transform: translate( 3px, 0); clip-path: inset(80% 0  8% 0); }
  92%  { transform: translate( 0px, 0); clip-path: inset( 0% 0  0% 0); }
  /* return to baseline */
  100% { transform: translate( 1px, 0); clip-path: inset(0 0 0 0); }
}

/* ── Cyan channel: always slightly present, strong during bursts ── */
@keyframes glitch-r {
  0%   { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  4%   { opacity: .9;  transform: translate(12px, 0); clip-path: inset( 4% 0 82% 0); }
  6%   { opacity: .9;  transform: translate(-12px,0); clip-path: inset(28% 0 52% 0); }
  8%   { opacity: .9;  transform: translate(10px, 0); clip-path: inset(65% 0 18% 0); }
  10%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  13%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  16%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  20%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(12% 0 68% 0); }
  22%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(48% 0 33% 0); }
  24%  { opacity: .9;  transform: translate(10px, 0); clip-path: inset(78% 0  6% 0); }
  26%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  29%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  32%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  36%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset( 8% 0 74% 0); }
  38%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(40% 0 40% 0); }
  40%  { opacity: .9;  transform: translate(-10px,0); clip-path: inset(72% 0 12% 0); }
  42%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  46%  { opacity: .1;  transform: translate( 0px, 0); clip-path: inset(0 0 0 0); }
  49%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  53%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(20% 0 62% 0); }
  55%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(55% 0 28% 0); }
  57%  { opacity: .9;  transform: translate(10px, 0); clip-path: inset(85% 0  4% 0); }
  59%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  62%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  65%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  69%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset( 5% 0 80% 0); }
  71%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(35% 0 45% 0); }
  73%  { opacity: .9;  transform: translate(-10px,0); clip-path: inset(68% 0 15% 0); }
  75%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  79%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  82%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  86%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(15% 0 70% 0); }
  88%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(50% 0 32% 0); }
  90%  { opacity: .9;  transform: translate(10px, 0); clip-path: inset(80% 0  8% 0); }
  92%  { opacity: .15; transform: translate( 0px, 0); clip-path: inset(0 0 0 0); }
  100% { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
}

/* ── Magenta channel: mirrors cyan (opposite X direction) ── */
@keyframes glitch-b {
  0%   { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  4%   { opacity: .9;  transform: translate(-12px,0); clip-path: inset( 4% 0 82% 0); }
  6%   { opacity: .9;  transform: translate(12px, 0); clip-path: inset(28% 0 52% 0); }
  8%   { opacity: .9;  transform: translate(-10px,0); clip-path: inset(65% 0 18% 0); }
  10%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  13%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  16%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  20%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(12% 0 68% 0); }
  22%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(48% 0 33% 0); }
  24%  { opacity: .9;  transform: translate(-10px,0); clip-path: inset(78% 0  6% 0); }
  26%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  29%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  32%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  36%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset( 8% 0 74% 0); }
  38%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(40% 0 40% 0); }
  40%  { opacity: .9;  transform: translate(10px, 0); clip-path: inset(72% 0 12% 0); }
  42%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  46%  { opacity: .1;  transform: translate( 0px, 0); clip-path: inset(0 0 0 0); }
  49%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  53%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(20% 0 62% 0); }
  55%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(55% 0 28% 0); }
  57%  { opacity: .9;  transform: translate(-10px,0); clip-path: inset(85% 0  4% 0); }
  59%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  62%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  65%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  69%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset( 5% 0 80% 0); }
  71%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(35% 0 45% 0); }
  73%  { opacity: .9;  transform: translate(10px, 0); clip-path: inset(68% 0 15% 0); }
  75%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  79%  { opacity: .15; transform: translate( 3px, 0); clip-path: inset(0 0 0 0); }
  82%  { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
  86%  { opacity: .9;  transform: translate(-12px,0); clip-path: inset(15% 0 70% 0); }
  88%  { opacity: .9;  transform: translate(12px, 0); clip-path: inset(50% 0 32% 0); }
  90%  { opacity: .9;  transform: translate(-10px,0); clip-path: inset(80% 0  8% 0); }
  92%  { opacity: .15; transform: translate( 0px, 0); clip-path: inset(0 0 0 0); }
  100% { opacity: .15; transform: translate(-3px, 0); clip-path: inset(0 0 0 0); }
}


.hero-name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.hero-name .accent {
  color: var(--accent);
}

.hero-title {
  font-size: 1.1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 2.5rem;
  min-height: 1.7em;
}

#typed-text {
  color: var(--green);
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  max-width: 540px;
  color: var(--muted);
  margin-bottom: 2rem;
}


.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);   /* dark navy on lime green — high contrast */
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-outline:hover {
  background: var(--green);
  color: var(--bg);
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p + p {
  margin-top: 1rem;
}

.about-text p {
  color: var(--muted);
}

.about-text strong {
  color: var(--text);
}

.about-text .hl {
  color: var(--accent);
  font-weight: 700;
}

.about-label {
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.about-label::before {
  content: '//';
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: default;
  transition: color 0.15s, text-shadow 0.15s;
  opacity: 0;
}

.tag::before {
  content: '[';
  color: var(--border);
  margin-right: 1px;
  transition: color 0.15s;
}

.tag::after {
  content: ']';
  color: var(--border);
  margin-left: 1px;
  transition: color 0.15s;
}

.tag:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(168, 200, 74, 0.7);
}

.tag:hover::before,
.tag:hover::after {
  color: var(--accent);
}

/* Staggered slide-in — triggered when .visible is added by IntersectionObserver */
@keyframes tag-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tag.visible {
  animation: tag-in 0.35s ease forwards;
}

.tag-list .tag:nth-child(1) { animation-delay: 0.05s; }
.tag-list .tag:nth-child(2) { animation-delay: 0.11s; }
.tag-list .tag:nth-child(3) { animation-delay: 0.17s; }
.tag-list .tag:nth-child(4) { animation-delay: 0.23s; }
.tag-list .tag:nth-child(5) { animation-delay: 0.29s; }
.tag-list .tag:nth-child(6) { animation-delay: 0.35s; }
.tag-list .tag:nth-child(7) { animation-delay: 0.41s; }
.tag-list .tag:nth-child(8) { animation-delay: 0.47s; }

/* ============================================================
   SKILLS
   ============================================================ */
#skills {
  border-bottom: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skills-grid:hover .skill-card {
  opacity: 0.35;
}

.skills-grid:hover .skill-card:hover {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(168, 200, 74, 0.15);
}

.skill-card h3 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.skill-card ul {
  list-style: none;
}

.skill-card ul li {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-card ul li::before {
  content: '▸';
  color: var(--green);
  font-size: 0.75rem;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
#experience {
  border-bottom: 1px solid var(--border);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px 1px 1fr;
  gap: 0 1.5rem;
  padding-bottom: 2.5rem;
  transition: opacity 0.3s ease;
}

.timeline:hover .timeline-item {
  opacity: 0.35;
}

.timeline:hover .timeline-item:hover {
  opacity: 1;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  padding-top: 0.2rem;
}

.timeline-line {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  flex-shrink: 0;
  margin-top: 0.3rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@keyframes dot-ping {
  0%   { box-shadow: 0 0 0 0   rgba(168, 200, 74, 0.6); }
  100% { box-shadow: 0 0 0 10px rgba(168, 200, 74, 0);  }
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.4);
  animation: dot-ping 1s ease-out infinite;
}

.timeline-connector {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}

.timeline-item:last-child .timeline-connector {
  display: none;
}

.timeline-content h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
  transition: color 0.25s ease;
}

.timeline-item:hover .timeline-content h3 {
  color: var(--accent);
}

.timeline-content .org {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  text-align: center;
}

.contact-box {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-box p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   SCROLL REVEAL — classes toggled by main.js IntersectionObserver
   Kept in CSS (not injected by JS) so CSP doesn't need unsafe-inline
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.skill-card.visible {
  transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

footer span {
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE — smaller screens
   ============================================================ */
@media (max-width: 900px) {
  .hero-outer {
    gap: 3rem;
  }

  .hero-grid {
    gap: 3rem;
  }

  .glitch-wrap {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .hero-outer {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  nav {
    justify-content: center;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 1rem;
    gap: 1.2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    order: -1;
    justify-content: center;
    margin-top: 0;
  }

  .glitch-wrap {
    max-width: 200px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .timeline-item {
    grid-template-columns: 90px 1px 1fr;
  }

  .hero-links {
    flex-direction: column;
  }
}
