/*
  Simple, responsive portfolio for a graphics programmer.
  Edit colors and spacing via CSS variables below.
*/
:root {
  --bg: #0b0f14;
  --bg-elev: #101620;
  --text: #e6edf3;
  --muted: #9fb0c0;
  --card: #0e131a;
  --accent: #7aa2f7;
  --accent-2: #a6da95;
  --border: #1a2432;
  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 90% -10%, rgba(122,162,247,.08), transparent 60%),
              radial-gradient(1200px 600px at -10% 10%, rgba(166,218,149,.06), transparent 60%),
              var(--bg);
  line-height: 1.6;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(10px);
  background: color-mix(in hsl, var(--bg), transparent 25%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .2px; }

.nav-toggle { display: none; }
.nav-menu { display: flex; gap: 22px; list-style: none; padding: 0; margin: 0; }
.nav-menu a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav-menu a:hover { color: var(--text); }

/* Sections */
.section { padding: 56px 0; }
.section h2 { font-size: 28px; margin: 0 0 16px; }
.section-lead { color: var(--muted); margin-top: -6px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.hero h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: .2px; }
.tagline { color: var(--muted); margin: 0 0 24px; max-width: 48ch; }
.cta { display: flex; gap: 12px; margin-bottom: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; background: var(--bg-elev); }
.btn.primary { background: linear-gradient(180deg, color-mix(in hsl, var(--accent) 70%, #fff 0%), var(--accent)); color: #0b1220; border: none; }
.btn:hover { filter: brightness(1.06); }
.note { color: var(--muted); font-size: 14px; }
.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(360px, 100%); height: auto; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Cards / Projects */
.grid.projects {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px;
}
.card { display: block; color: inherit; text-decoration: none; cursor: pointer; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: clip; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in hsl, var(--accent), var(--border) 60%); box-shadow: 0 10px 28px rgba(0,0,0,0.45); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.project .thumb { aspect-ratio: 16/9; background: #0a0f15; background-image: var(--thumb); background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.card-body { padding: 14px; }
.card-body h3 { margin: 0 0 6px; font-size: 18px; }
.card-body p { margin: 0 0 10px; color: var(--muted); }
/* Deprecated link row inside cards is removed in favor of full-card anchor */

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skills h3 { margin: 0 0 8px; font-size: 16px; color: #d7e0ea; }
.skills ul { margin: 0; padding-left: 18px; color: var(--muted); }

/* Contact */
.contact { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; padding: 0; margin: 6px 0 0; }
.contact a { color: var(--accent-2); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .grid.projects { grid-template-columns: 1fr 1fr; }
  .skills { grid-template-columns: 1fr 1fr; }
}

/* Timeline */
.timeline { position: relative; }
.timeline .timeline-rail { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--border); transform: translateX(-50%); border-radius: 2px; overflow: hidden; }
.timeline .timeline-progress { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.timeline-list { list-style: none; margin: 20px 0 0; padding: 0; }
.timeline-event { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; min-height: 160px; margin: 28px 0; }
.timeline-event .dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; background: #1a2432; border: 2px solid var(--accent); border-radius: 999px; box-shadow: 0 0 0 4px rgba(122,162,247,0.12); transform: translate(-50%, -50%); transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease; }
.timeline-event .when { color: #d7e0ea; font-size: 14px; margin: 0 0 6px; opacity: .9; }
.timeline-event .timeline-card { max-width: 520px; }
.timeline-event .thumb { aspect-ratio: 16/9; background: #0a0f15; background-image: var(--thumb); background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.timeline-event:nth-child(odd) .timeline-card { grid-column: 1; justify-self: end; }
.timeline-event:nth-child(even) .timeline-card { grid-column: 2; justify-self: start; }
.timeline-event .card-body { padding: 12px 14px; }
.timeline-event .timeline-card { opacity: 1; transform: none; }
.timeline-event .timeline-card { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.timeline-event.active .timeline-card {
  border-color: color-mix(in hsl, var(--accent), var(--border) 45%);
  /* Subtle lift + colored ring glow (same hue as active dot) */
  box-shadow:
    0 12px 30px rgba(0,0,0,0.5),
    0 0 0 8px rgba(122,162,247,0.22);
  transform: translateY(-2px);
}
.timeline-event.active .dot { box-shadow: 0 0 0 8px rgba(122,162,247,0.16); transform: translate(-50%, -50%) scale(1.18); }
.timeline-event.in-view .dot { background: var(--accent); border-color: var(--accent-2); box-shadow: 0 0 0 6px rgba(166,218,149,0.18); transform: translate(-50%, -50%) scale(1.12); }

@media (max-width: 960px) {
  .timeline .timeline-rail { left: 16px; transform: none; }
  .timeline-event { grid-template-columns: 24px 1fr; gap: 14px; min-height: 140px; }
  .timeline-event .dot { left: 16px; transform: translate(-50%, -50%); }
  .timeline-event .timeline-card { grid-column: 2; justify-self: stretch; max-width: none; }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; height: 36px; padding: 0 12px; align-items: center; border-radius: 8px; border: 1px solid var(--border); color: var(--text); background: var(--bg-elev); }
  .nav-menu { display: none; position: absolute; right: 20px; top: 56px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px; flex-direction: column; min-width: 180px; box-shadow: var(--shadow); }
  .nav-menu.open { display: flex; }
  .grid.projects { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
}
