@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --color-ink: #162033;
  --color-body: #5b677a;
  --color-surface: rgba(255, 255, 255, 0.9);
  --color-surface-strong: #ffffff;
  --color-surface-muted: #f5f7fb;
  --color-line: rgba(22, 32, 51, 0.1);
  --color-accent: #1f4f8f;
  --color-accent-deep: #173b69;
  --color-accent-soft: #d7e5f7;
  --color-highlight: #eef4fc;
  --color-shadow: rgba(20, 31, 51, 0.08);
  --radius-lg: 1.25rem;
  --radius-md: 0.9rem;
  --container-width: 72rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--color-ink);
  background:
    radial-gradient(circle at top left, rgba(210, 224, 245, 0.55), transparent 34%),
    radial-gradient(circle at top right, rgba(232, 238, 248, 0.7), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, #edf2f8 46%, #f8fafc 100%);
}

.site-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.site-page::before,
.site-page::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.site-page::before {
  top: -10rem;
  right: -6rem;
  background: rgba(224, 234, 247, 0.95);
}

.site-page::after {
  bottom: -12rem;
  left: -10rem;
  background: rgba(196, 214, 239, 0.45);
}

.site-navbar,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-navbar {
  padding: 1rem 0;
}

.site-navbar .navbar {
  width: min(calc(100% - 2rem), var(--container-width));
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  box-shadow: 0 14px 38px var(--color-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.navbar-brand {
  font-family: "Instrument Serif", serif;
  font-size: 1.8rem;
  color: var(--color-accent-deep);
  letter-spacing: 0.01em;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--color-accent);
}

.site-navbar .nav-link {
  position: relative;
  padding: 0.5rem 0.95rem !important;
  color: var(--color-ink);
  font-weight: 500;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus,
.site-navbar .nav-link.active {
  color: var(--color-accent-deep);
}

.site-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.2rem;
  height: 0.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), #4f7fbd);
}

.site-navbar .navbar-toggler {
  border-color: rgba(23, 59, 105, 0.18);
}

.site-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(31, 79, 143, 0.14);
}

.site-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2822, 32, 51, 0.88%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-main {
  flex: 1;
  padding: 2rem 0 4rem;
}

.page-shell {
  width: min(calc(100% - 2rem), var(--container-width));
  margin: 0 auto;
}

.hero-panel,
.content-panel,
.contact-card,
.resume-panel,
.project-card,
.mini-card {
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 42px var(--color-shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.hero-panel,
.content-panel,
.resume-panel {
  border-radius: calc(var(--radius-lg) + 0.3rem);
}

.hero-panel {
  padding: clamp(2rem, 4vw, 4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--color-highlight);
  color: var(--color-accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--color-accent);
}

.display-title,
.section-title {
  font-family: "Instrument Serif", serif;
  color: #132235;
  line-height: 1;
}

.display-title {
  font-size: clamp(3rem, 6vw, 5.2rem);
  margin: 0.9rem 0 1.1rem;
}

.section-title {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  margin-bottom: 1rem;
}

.hero-copy,
.section-copy,
.profile-copy,
.content-copy,
.card-text,
.contact-meta,
.detail-list {
  color: var(--color-body) !important;
}

.hero-copy,
.section-copy {
  max-width: 40rem;
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-brand,
.btn-brand-outline,
.btn-brand-soft {
  border-radius: 0.9rem;
  padding: 0.82rem 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

.btn-brand {
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent) 0%, #2f66ab 100%);
  border: none;
  box-shadow: 0 10px 24px rgba(31, 79, 143, 0.2);
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  background: linear-gradient(135deg, #1d467d 0%, #1f4f8f 100%);
}

.btn-brand-outline {
  color: var(--color-accent-deep);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 59, 105, 0.14);
}

.btn-brand-outline:hover,
.btn-brand-outline:focus {
  color: var(--color-accent-deep);
  background: #ffffff;
  border-color: rgba(23, 59, 105, 0.24);
}

.btn-brand-soft {
  color: var(--color-accent-deep);
  background: var(--color-highlight);
  border: 1px solid rgba(23, 59, 105, 0.1);
}

.hero-stats,
.tag-list,
.skill-list,
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-stats {
  margin-top: 2rem;
}

.stat-pill,
.tag-chip,
.mini-card {
  border-radius: var(--radius-md);
}

.stat-pill {
  min-width: 11rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--color-line);
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5e7596;
}

.stat-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-ink);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  border-radius: 1.5rem;
  background: linear-gradient(160deg, rgba(31, 79, 143, 0.08), rgba(255, 255, 255, 0.55));
  transform: rotate(-4deg);
}

.hero-visual-card {
  position: relative;
  width: min(100%, 25rem);
  padding: 2rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--color-line);
  box-shadow: 0 14px 34px rgba(20, 31, 51, 0.08);
  text-align: center;
}

.profile-image {
  width: min(100%, 16rem);
  height: auto;
  margin-bottom: 1.25rem;
}

.profile-image--about {
  width: min(100%, 18rem);
  margin-bottom: 0;
}

.visual-caption {
  font-size: 0.95rem;
  color: #617086;
}

.content-panel,
.resume-panel {
  padding: clamp(1.75rem, 3vw, 3rem);
}

.content-panel + .content-panel {
  margin-top: 1.5rem;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.mini-card {
  padding: 1.2rem;
}

.mini-card h3,
.project-card h3,
.contact-card h2,
.resume-panel h1 {
  color: #132235;
}

.detail-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.8;
}

.skill-list {
  margin-top: 1.5rem;
}

.tag-chip {
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 59, 105, 0.12);
  color: var(--color-accent-deep);
  font-size: 0.92rem;
  font-weight: 500;
}

.project-card {
  height: 100%;
  padding: 1.8rem;
  border-radius: 1.2rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(20, 31, 51, 0.12);
}

.project-card .card-kicker {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #47658f;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.contact-card {
  width: 100%;
  max-width: none;
  padding: clamp(1.75rem, 3vw, 3rem);
  border-radius: 1.2rem;
}

.contact-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-item {
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 59, 105, 0.1);
  border-radius: 0.9rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.94rem;
  font-weight: 700;
  color: #324760;
}

.form-input {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(23, 59, 105, 0.14);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--color-ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-input::placeholder {
  color: #8a7a6a;
}

.form-input:focus {
  outline: none;
  border-color: rgba(31, 79, 143, 0.34);
  background: #fff;
  box-shadow: 0 0 0 0.25rem rgba(31, 79, 143, 0.09);
}

textarea.form-input {
  min-height: 10rem;
  resize: vertical;
}

.resume-frame {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 59, 105, 0.08);
}

.resume-embed {
  width: 100%;
  height: 72vh;
  min-height: 31.25rem;
  border-radius: 1rem;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--container-width));
  margin: 0 auto 1.5rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: #6a7688;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

button,
input,
textarea,
select {
  font: inherit;
}

@media (max-width: 991.98px) {
  .site-navbar .navbar {
    border-radius: 1.5rem;
  }

  .display-title {
    font-size: clamp(2.8rem, 10vw, 4.8rem);
  }

  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    margin-top: 2rem;
  }
}

@media (max-width: 575.98px) {
  .site-main {
    padding-top: 1rem;
    padding-bottom: 2.5rem;
  }

  .site-navbar {
    padding-top: 0.75rem;
  }

  .site-navbar .navbar {
    width: calc(100% - 1rem);
    padding: 0.85rem 1rem;
  }

  .hero-panel,
  .content-panel,
  .resume-panel,
  .contact-card,
  .project-card {
    padding: 1.4rem;
  }

  .profile-image {
    width: min(72vw, 12rem);
  }

  .profile-image--about {
    width: min(78vw, 14rem);
  }

  .hero-actions,
  .project-actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .project-actions .btn,
  .no-print .btn {
    width: 100%;
  }

  .stat-pill {
    width: 100%;
  }

  .resume-embed {
    min-height: 24rem;
    height: 60vh;
  }
}

@media print {
  #navbar,
  nav,
  .no-print,
  .eyebrow,
  .section-title,
  .section-copy,
  .site-footer {
    display: none !important;
  }

  body,
  .site-page {
    background: white !important;
    color: black !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .hero-panel,
  .content-panel,
  .resume-panel,
  .contact-card,
  .project-card,
  .resume-frame,
  .page-shell,
  .site-main {
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .resume-embed {
    width: 100% !important;
    height: 100vh !important;
    min-height: 0 !important;
    border-radius: 0 !important;
  }

  @page {
    margin: 0;
  }
}
