/* ===== Tokens ===== */
:root {
  --navy: #0F2C4C;
  --blue: #1B4F72;
  --blue-mid: #2980B9;
  --blue-soft: #E8F4FC;
  --cream: #F7F5F0;
  --ink: #1A1A1A;
  --muted: #5A6570;
  --white: #FFFFFF;
  --line: #D8E4EE;
  --radius: 14px;
  --font: 'DM Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 44, 76, 0.06);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  letter-spacing: 0.04em;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: white;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

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

.nav-cta {
  background: var(--navy);
  color: white !important;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.nav-cta:hover { background: var(--blue); }

@media (max-width: 560px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ===== Hero ===== */
.hero {
  padding: 3rem 1.5rem 4rem;
  background: linear-gradient(165deg, #0F2C4C 0%, #1B4F72 55%, #1A6B9A 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(41, 128, 185, 0.35), transparent),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(15, 44, 76, 0.4), transparent);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-photo {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.hero-photo-ring {
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 26px;
  z-index: 0;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  opacity: 0.9;
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.65;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

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

.btn-primary {
  background: white;
  color: var(--navy);
}

.btn-primary:hover { background: var(--blue-soft); }

.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: white;
}

.btn-ghost:hover { border-color: white; background: rgba(255,255,255,0.08); }

@media (max-width: 720px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-photo {
    margin: 0 auto;
    width: 160px;
    height: 160px;
  }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
}

/* ===== Sections ===== */
.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 1.75rem;
}

/* About */
.about {
  background: var(--white);
}

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

.about-text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
}

.about-text strong {
  color: var(--ink);
  font-weight: 600;
}

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

/* Experience / Timeline */
.experience {
  background: var(--white);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line);
  margin-bottom: 2.5rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.25rem;
}

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

.timeline-marker {
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--blue);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--white);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
}

.timeline-dates {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.timeline-prior {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.6rem;
  line-height: 1.45;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
}

.timeline-content li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  line-height: 1.55;
}

.timeline-content li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--blue-mid);
}

.earlier-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
}

.earlier-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.earlier-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.925rem;
  color: var(--muted);
}

.earlier-list strong { color: var(--ink); font-weight: 600; }

.earlier-list span {
  float: right;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .earlier-list span {
    float: none;
    display: block;
    margin-top: 0.1rem;
  }
}

/* Skills */
.skills {
  background: var(--white);
}

.skills-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.skill-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  border: 1px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.skill-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.skill-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.skill-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 800px) {
  .skills-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .skills-cards { grid-template-columns: 1fr; }
}

/* Contact */
.contact {
  background: linear-gradient(165deg, #0F2C4C 0%, #1B4F72 100%);
  color: white;
  padding: 4.5rem 1.5rem;
}

.contact .section-title { color: white; }

.contact-lead {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 28rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  transition: background 0.15s, border-color 0.15s;
}

.contact-card:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
}

.contact-card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.3rem;
}

.contact-card-value {
  font-size: 1rem;
  font-weight: 600;
}

.contact-loc {
  font-size: 0.9rem;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* Footer */
.footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--cream);
  border-top: 1px solid var(--line);
}

/* Print */
@media print {
  .nav, .footer, .hero-actions { display: none; }
  .hero { background: var(--navy) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: white; }
}

/* ===== Projects ===== */
.projects {
  background: var(--cream);
}

.projects-intro {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: -1rem;
  margin-bottom: 2rem;
  max-width: 36rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.35rem;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: #B8D4E8;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 44, 76, 0.08);
}

.project-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  background: #EEF2F6;
  color: var(--muted);
}

.project-current .project-badge {
  background: #E0F0E8;
  color: #1B6B3A;
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.project-tags li {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .projects-grid { grid-template-columns: 1fr; }
}
