/* ─── Reset & base ─────────────────────────────────────── */

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

:root {
  --bg: #fafaf7;
  --bg-elevated: #ffffff;
  --bg-dark: #0f172a;
  --bg-dark-soft: #1e293b;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --accent-hover: #92400e;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

/* ─── Layout containers ────────────────────────────────── */

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

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

.section-heading {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ─── Navigation ───────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--bg-dark);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background 0.15s ease;
}

.nav-cta:hover {
  background: var(--bg-dark-soft);
  color: #ffffff !important;
}

/* ─── Hero ─────────────────────────────────────────────── */

.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle at center,
    var(--accent-soft) 0%,
    transparent 70%
  );
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--text);
}

.hero-subtitle {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 0 28px;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 0 28px;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-item a {
  color: var(--text-muted);
  font-weight: 500;
}

.hero-meta-item a:hover {
  color: var(--text);
}

.hero-meta-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease,
    box-shadow 0.15s ease;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--bg-dark);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--bg-dark-soft);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text);
  background: var(--bg-elevated);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

/* ─── Summary ──────────────────────────────────────────── */

.summary p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 12px;
  max-width: 880px;
}

/* ─── Experience timeline ─────────────────────────────── */

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

.role {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.role:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.role-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 18px;
  margin-bottom: 4px;
}

.role-title {
  font-size: 18.5px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.role-company {
  font-weight: 600;
  color: var(--accent);
}

.role-dates {
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 500;
  white-space: nowrap;
}

.role-location {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 16px;
}

.role ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 14.5px;
}

.role li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* ─── Skills grid ──────────────────────────────────────── */

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

.skill-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.skill-card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}

.skill-tag:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

/* ─── Education / Awards rows ─────────────────────────── */

.row-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.row-item-primary {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  margin: 0;
}

.row-item-secondary {
  font-size: 14px;
  color: var(--text-muted);
}

.row-item-date {
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 500;
}

/* ─── Projects grid (projects page) ───────────────────── */

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

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.project-card-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.project-card-meta {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}

.project-card-desc {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.project-stack-tag {
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ─── Footer ───────────────────────────────────────────── */

footer {
  padding: 36px 0 48px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13.5px;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--text-muted);
  margin: 0 10px;
  font-weight: 500;
}

footer a:hover {
  color: var(--text);
}

/* ─── Responsive ───────────────────────────────────────── */

@media (max-width: 640px) {
  section {
    padding: 40px 0;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .section-heading {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .role,
  .skill-card,
  .row-item {
    padding: 20px;
  }

  .role-header {
    flex-direction: column;
    gap: 4px;
  }

  .role-dates {
    white-space: normal;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

/* ─── Print ────────────────────────────────────────────── */

@media print {
  .nav,
  .hero-cta,
  footer {
    display: none;
  }

  body {
    background: #ffffff;
    font-size: 11.5pt;
  }

  section {
    padding: 18px 0;
    border-bottom: none;
    break-inside: avoid;
  }

  .role,
  .skill-card,
  .row-item,
  .project-card {
    box-shadow: none;
    border: 1px solid #d1d5db;
    break-inside: avoid;
  }

  .hero {
    padding: 0 0 18px;
  }

  .hero::before {
    display: none;
  }
}
