

:root {
  --bg: #faf7f5;
  --panel: #ffffff;
  --text: #1a1f36;
  --muted: #6a6475;
  --brand: #5b6fe6;
  --brand-strong: #4a5bd5;
  --border: #ece7e2;

  /* Additional accents */
  --accent: #0ea5a5;         /* teal */
  --accent-strong: #0b8c8c;
  --highlight: #f59e0b;      /* amber for highlights */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --radius: 12px;

  --container: 1120px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklab, var(--panel) 90%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font-weight: 700;
}
.site-nav ul {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a.active, .site-nav a:hover, .site-nav a:focus {
  color: var(--brand-strong);
}

/* Global link accents */
a { color: var(--brand-strong); }
a:hover { color: var(--brand); }
a { text-decoration-color: color-mix(in oklab, var(--brand) 35%, currentColor); text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* Consistent focus and text selection */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--brand) 35%, transparent); color: #0b1324; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: var(--space-2);
}
.nav-toggle:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/* Footer */
.site-footer {
  margin-top: var(--space-16);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-8) 0;
}
.socials { display: flex; gap: var(--space-4); }
.socials a { color: var(--muted); text-decoration: none; }
.socials a:hover { color: var(--brand-strong); }

/* Hero */
.hero {
  padding: var(--space-16) 0;
  background:
    radial-gradient(1200px 400px at 10% 0%, color-mix(in oklab, var(--accent) 8%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #faf7f5 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.hero-text h1 { line-height: 1.2; margin: 0 0 var(--space-4); font-size: 2.75rem; }
.hero-text p { color: var(--muted); margin: 0 0 var(--space-6); }
.hero-cta { display: flex; gap: var(--space-4); flex-wrap: wrap; }

.hero-media img {
  /* width: 100%; */
  max-height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* Sections */
.page section, .highlights { padding-block: var(--space-16); }
.page section + section { border-top: 1px solid var(--border); }

/* Very light alternating section background for depth */
.page section:nth-of-type(even) { background: color-mix(in oklab, var(--brand) 3%, #fff); }

/* Section heading accents */
.page h1, .highlights h2 { position: relative; }
.page h1::after, .highlights h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  margin-top: var(--space-3);
}
.page h1::after { background: var(--brand); }
.highlights h2::after { background: var(--accent); }

/* Overline label */
.overline {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: color-mix(in oklab, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border));
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: var(--space-3);
}
.lede { color: var(--muted); }

.grid {
  display: grid;
  gap: var(--space-8);
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Contact-specific grid spacing tweak */
.contact-grid { gap: var(--space-8); }

/* Accent headings for contact cards */
.accent-title {
  color: var(--accent-strong);
}
.accent-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: var(--space-3);
}

/* Subtle background tint for info card */
.card.info-card {
  background: color-mix(in oklab, var(--brand) 6%, #fff);
  border-color: color-mix(in oklab, var(--brand) 22%, var(--border));
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  border-top: 3px solid transparent;
  transition: box-shadow .25s ease, transform .15s ease;
}

.card:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08), 0 14px 30px rgba(16, 24, 40, 0.10); }

/* Rotate subtle accent colors across cards */
.grid.three .card:nth-child(3n+1) { border-top-color: var(--accent); }
.grid.three .card:nth-child(3n+2) { border-top-color: var(--highlight); }
.grid.three .card:nth-child(3n) { border-top-color: var(--success); }
.project.card { border-top-color: var(--brand); }

.project .thumb {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: var(--space-6);
}
.project .thumb img { transition: transform .35s ease; }
.project:hover .thumb img { transform: scale(1.03); }

/* Corner year ribbon for projects */
.project { position: relative; }
.project[data-year]:not([data-year=""]):not([data-year="YYYY"])::after {
  content: attr(data-year);
  position: absolute;
  top: 12px;
  right: -42px;
  transform: rotate(45deg);
  background: var(--brand-strong);
  color: #fff;
  padding: 4px 56px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(16,24,40,0.20);
  z-index: 1;
}
@media (max-width: 640px) {
  .project[data-year]:not([data-year=""]):not([data-year="YYYY"])::after {
    top: 10px;
    right: -38px;
    padding: 3px 48px;
    font-size: 11px;
  }
}

/* Tech chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-4); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  background: color-mix(in oklab, var(--brand) 8%, #fff);
  border: 1px solid color-mix(in oklab, var(--brand) 25%, var(--border));
}
.chip-accent { background: color-mix(in oklab, var(--accent) 10%, #fff); border-color: color-mix(in oklab, var(--accent) 30%, var(--border)); color: var(--accent-strong); }
.chip-highlight { background: color-mix(in oklab, var(--highlight) 10%, #fff); border-color: color-mix(in oklab, var(--highlight) 30%, var(--border)); }
.chip-success { background: color-mix(in oklab, var(--success) 10%, #fff); border-color: color-mix(in oklab, var(--success) 30%, var(--border)); }
.chip-brand { background: color-mix(in oklab, var(--brand) 10%, #fff); border-color: color-mix(in oklab, var(--brand) 30%, var(--border)); color: var(--brand-strong); }

.list { margin: 0; padding-left: 20px; }
.list.links { list-style: none; padding: 0; }
.list.links li { margin-bottom: var(--space-3); }
.list.links a { color: var(--brand-strong); text-decoration: none; }
.list.links a:hover { color: var(--brand); }

/* Contact form status */
#contact-status { font-size: 0.95rem; }
#contact-status.is-success { color: var(--success); }
#contact-status.is-error { color: var(--danger); }
#contact-status.is-hidden { display: none; }

/* Contact form two-column layout (desktop), single column on mobile */
.contact-form.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 640px) {
  .contact-form.two-cols { grid-template-columns: 1fr; }
}
.contact-form.two-cols > label:nth-child(1),
.contact-form.two-cols > label:nth-child(2) { grid-column: span 1; }
.contact-form.two-cols > label:nth-child(3) { grid-column: 1 / -1; }
.contact-form.two-cols > button { grid-column: 1 / -1; justify-self: start; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
  transition: box-shadow .2s ease, transform .1s ease, background .2s ease;
}
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn:hover { box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15); transform: translateY(-1px); }
.btn.small { padding: 8px 12px; font-size: 0.95rem; }

/* Secondary button variant */
.btn.secondary { background: color-mix(in oklab, var(--accent) 14%, #fff); border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); color: var(--accent-strong); }
.btn.secondary:hover { background: color-mix(in oklab, var(--accent) 22%, #fff); }

/* Typography */
h1 { font-size: 2.25rem; margin: 0 0 var(--space-6); }
h2 { font-size: 1.75rem; margin: 0 0 var(--space-4); }
h3 { font-size: 1.2rem; margin: 0 0 var(--space-3); }
p { margin: 0 0 var(--space-4); }

/* Accented text helpers */
mark { background: color-mix(in oklab, var(--highlight) 18%, transparent); padding: 0 4px; border-radius: 4px; }
strong { color: var(--text); }
.accent { color: var(--accent-strong); }

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--space-2); }
  .grid.two, .grid.three { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin: var(--space-2) var(--space-6); padding: var(--space-4) 0; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0; }
  .site-nav li + li { border-top: 1px solid var(--border); }
  .site-nav a { display: block; padding: var(--space-4) var(--space-6); }

  .hero-inner { padding: 0;}
  .hero-text p { width: 80%;}
  .hero-text h1 { width: 80%; font-size: 2rem; }
}

/* Minor tweaks for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}


