@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  --accent:       #2c4a6e;
  --accent-light: #e8eef5;
  --text:         #1a1a2e;
  --muted:        #5a6478;
  --border:       #d0d9e6;
  --page-bg:      #f4f6f9;
  --card-bg:      #ffffff;
  --rule:         2px solid var(--accent);
  --font-body:    'Inter', sans-serif;
  --font-head:    'Playfair Display', serif;
}

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Site chrome ── */
.site-nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.site-links {
  display: flex;
  gap: 1.25rem;
}

.site-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

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

.site-main {
  flex: 1;
  padding: 2rem 1rem 3rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.site-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Home hero ── */
.hero {
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 2.5rem 2.8rem;
  border-top: 4px solid var(--accent);
}

.hero h1 {
  font-family: var(--font-head);
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.hero-tagline {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero-summary {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

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

.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

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

.btn-primary:hover { background: #1e3550; color: #fff; }

.btn-secondary {
  background: var(--accent-light);
  color: var(--accent);
}

.btn-secondary:hover { background: #d4e0ed; }

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.hero-contact .sep { opacity: 0.4; }
.hero-contact a { color: var(--accent); text-decoration: none; }
.hero-contact a:hover { text-decoration: underline; }

.hero-location {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ── Contact page ── */
.contact-page {
  max-width: 560px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.contact-form .field span {
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent-light);
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-status {
  font-size: 0.88rem;
  min-height: 1.2rem;
}

.contact-status.ok { color: #1a6b3c; }
.contact-status.err { color: #9b1c1c; }

/* ── Projects page ── */
.page-header { margin-bottom: 1.75rem; }

.page-header h1 {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.page-lead {
  color: var(--muted);
  font-size: 0.95rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.project-card h2 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

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

.project-tags li {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 3px;
}

.project-link {
  margin-top: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.project-link-muted { color: var(--muted); font-weight: 400; font-style: italic; }

/* ── Resume page ── */
.resume {
  max-width: 820px;
  margin: 0 auto;
  background: var(--card-bg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  border-radius: 6px;
  overflow: hidden;
}

.header {
  background: var(--accent);
  color: #fff;
  padding: 2.4rem 2.8rem 2rem;
  position: relative;
}

.header::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7aafd4, #2c4a6e, #7aafd4);
}

.header h1 {
  font-family: var(--font-head);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.header .title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.8rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.84rem;
  opacity: 0.9;
}

.contact-row a {
  color: #b8d4ee;
  text-decoration: none;
}

.contact-row a:hover { text-decoration: underline; }
.contact-row .sep { opacity: 0.4; }

.body { padding: 2rem 2.8rem 2.4rem; }

.section { margin-bottom: 1.8rem; }

.section-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: var(--rule);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.summary p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.career-note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 1.1rem 0;
}

.job { margin-bottom: 1.4rem; }
.job:last-child { margin-bottom: 0; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.45rem;
}

.job-company {
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--text);
}

.job-location {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
}

.job-role {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--accent);
  margin-left: 0.4rem;
}

.job-dates {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  font-style: italic;
}

.job ul {
  padding-left: 1.2rem;
  list-style: none;
}

.job ul li {
  position: relative;
  padding-left: 0.9rem;
  font-size: 0.88rem;
  color: #3a3a4a;
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.job ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 0.15em;
}

.job ul li strong {
  color: var(--text);
  font-weight: 600;
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.tech-table thead tr {
  background: var(--accent);
  color: #fff;
}

.tech-table thead th {
  padding: 0.5rem 0.9rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.tech-table tbody tr:nth-child(even) { background: var(--accent-light); }
.tech-table tbody tr:nth-child(odd) { background: #fff; }

.tech-table tbody td {
  padding: 0.55rem 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.tech-table tbody td:first-child {
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
  width: 35%;
}

.edu-list {
  list-style: none;
  padding: 0;
}

.edu-list li {
  padding: 0.3rem 0 0.3rem 1.1rem;
  position: relative;
  font-size: 0.88rem;
  color: #3a3a4a;
  border-bottom: 1px dashed var(--border);
}

.edu-list li:last-child { border-bottom: none; }

.edu-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.45em;
  color: var(--accent);
  font-size: 0.55rem;
}

.edu-list li strong {
  font-weight: 600;
  color: var(--text);
}

@media print {
  .site-nav, .site-footer { display: none; }
  body { background: #fff; }
  .site-main { padding: 0; max-width: 100%; }
  .resume { box-shadow: none; border-radius: 0; }
  .header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .tech-table thead tr,
  .tech-table tbody tr:nth-child(even) {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (max-width: 600px) {
  .hero { padding: 1.6rem 1.2rem; }
  .hero h1 { font-size: 1.8rem; }
  .header { padding: 1.6rem 1.2rem 1.4rem; }
  .body { padding: 1.4rem 1.2rem; }
  .header h1 { font-size: 1.6rem; }
  .job-header { flex-direction: column; }
  .site-links { gap: 0.85rem; }
}

.resume .title { font-family: Verdana, Geneva, sans-serif; }
