/* Technical-editorial CV site — matches ATS PDF palette */
:root {
  --ink: #121820;
  --ink-soft: #2a3642;
  --muted: #5a6a78;
  --paper: #f4f7f8;
  --paper-elevated: #ffffff;
  --accent: #0b5f6b;
  --accent-deep: #084852;
  --accent-soft: #d9ebee;
  --line: #c9d6db;
  --shadow: 0 18px 50px rgba(18, 24, 32, 0.08);
  --radius: 4px;
  --wrap: 1080px;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(11, 95, 107, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(8, 72, 82, 0.08), transparent 50%),
    linear-gradient(180deg, #eef4f5 0%, var(--paper) 32%, #eef3f4 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(11, 95, 107, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 95, 107, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(244, 247, 248, 0.86);
  border-bottom: 1px solid rgba(201, 214, 219, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 3.75rem;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.nav {
  display: flex;
  gap: 1.1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-header .btn-primary {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 2.5rem;
  align-items: end;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  animation: rise 0.45s var(--ease) both;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  animation: rise 0.5s var(--ease) 0.04s both;
}

.hero-title {
  margin-top: 0.65rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--accent);
  animation: rise 0.5s var(--ease) 0.08s both;
}

.hero-lead {
  margin-top: 1.1rem;
  max-width: 40rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  animation: rise 0.55s var(--ease) 0.12s both;
}

.founder-note {
  margin-top: 0.9rem;
  max-width: 42rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 0.94rem;
  animation: rise 0.55s var(--ease) 0.16s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
  animation: rise 0.6s var(--ease) 0.2s both;
}

.hero-photo {
  justify-self: end;
  width: min(100%, 260px);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px var(--line),
    0 18px 40px rgba(18, 24, 32, 0.14);
  animation: rise 0.58s var(--ease) 0.08s both;
  background: #fff;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sections */
.section {
  padding: 3.25rem 0;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: rgba(255, 255, 255, 0.45);
  border-block: 1px solid rgba(201, 214, 219, 0.65);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.section-head p {
  color: var(--muted);
}

.section-head-wide {
  max-width: 46rem;
}

.section-kicker {
  margin-bottom: 0.35rem;
  color: var(--accent) !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* System design evidence */
.architecture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.architecture-item {
  position: relative;
  min-height: 15rem;
  padding: 1.5rem 1.6rem 1.4rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.architecture-index {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
}

.architecture-item h3 {
  margin-top: 2.25rem;
  max-width: 23rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.15;
}

.architecture-item p {
  margin-top: 0.7rem;
  max-width: 28rem;
  color: var(--ink-soft);
}

.evidence {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Roles */
.role {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.role:last-child {
  border-bottom: 1px solid var(--line);
}

.role-featured {
  padding: 1.6rem 0;
}

.role-featured:first-of-type {
  border-top: none;
  padding-top: 0;
}

.role-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
}

.role h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.company {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

.role time {
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.role-summary {
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
  max-width: 52rem;
}

.role ul {
  margin-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
  max-width: 54rem;
}

.role li {
  color: var(--ink);
}

.stack {
  margin-top: 0.85rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.stack span {
  display: inline-block;
  margin-right: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
}

.role-ref {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.role-ref a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.role-ref a:hover {
  text-decoration: underline;
}

/* Earlier experience disclosure */
.earlier {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background: var(--paper-elevated);
  border-radius: var(--radius);
  overflow: hidden;
}

.earlier-head {
  padding: 0.8rem 1.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}

.earlier .role {
  padding: 1.1rem 1.15rem;
  margin: 0;
}

.earlier .role:first-of-type {
  border-top: none;
}

.earlier .role:last-child {
  border-bottom: none;
}

/* Capabilities */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cap {
  padding: 1.25rem 1.3rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cap:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cap h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
  color: var(--accent-deep);
}

.cap p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.project {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.project:hover,
.project:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.project img {
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  object-position: top;
  display: block;
  border-bottom: 1px solid var(--line);
}

.project-body {
  padding: 1rem 1.05rem 1.15rem;
  display: grid;
  gap: 0.4rem;
}

.project-role {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.project-body p {
  color: var(--muted);
  font-size: 0.92rem;
}

.project-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

.edu-line {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.cert-list {
  margin-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
  color: var(--ink-soft);
}

.note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  background: rgba(255, 255, 255, 0.5);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .hero-grid,
  .projects,
  .cap-grid,
  .edu-grid,
  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    justify-self: start;
    width: min(180px, 46vw);
    order: -1;
  }

  .architecture-item {
    min-height: 0;
  }

  .architecture-item h3 {
    margin-top: 1.25rem;
  }

  .role-top {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 1.5rem, var(--wrap));
  }

  .hero {
    padding-top: 1.5rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .site-header .btn-primary {
    font-size: 0.78rem;
    padding: 0.4rem 0.65rem;
  }
}
