:root {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --kicker-color: #74839a;
  --tag-border: rgba(37, 99, 235, 0.08);
  --max: 980px;
  --radius: 22px;
  --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.04), transparent 25%),
    linear-gradient(180deg, #f8fafc 0%, #f6f8fb 100%);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

.skip-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a:focus-visible,
.button:focus-visible,
.link-inline:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link {
    transition: none;
  }

  .fade-in,
  .fade-in.delay-1,
  .fade-in.delay-2 {
    animation: none !important;
  }
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-links a.active::after {
  transform: scaleX(1);
}

main {
  padding: 4rem 0 5rem;
}

section {
  margin-bottom: 3.5rem;
}

.hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 0 0 0.7rem;
}

h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  margin-top: 0.55rem;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.section-intro {
  margin-bottom: 1.5rem;
}

.section-intro .lead {
  margin-top: 0.25rem;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 23, 42, 0.12);
}

.button.primary {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

.grid-2,
.grid-3,
.simple-stack {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 23, 42, 0.1);
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kicker-color);
  margin-bottom: 0.7rem;
}

.muted {
  color: var(--muted);
  margin-top: 0.45rem;
}

.list {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.list li {
  margin-bottom: 0.45rem;
  padding-left: 0.1rem;
}

.link-inline {
  color: var(--accent);
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.link-inline:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-social a {
  color: var(--muted);
  font-weight: 500;
}

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

.footer-dot {
  color: var(--line);
  user-select: none;
}

.center-home {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-hero-page.center-home {
  padding-left: 1rem;
  padding-right: 1rem;
}

.home-hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 768px) {
  .home-hero {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .home-hero .home-content {
    text-align: left;
  }

  .home-hero .home-links {
    justify-content: flex-start;
  }
}

.home-avatar {
  width: clamp(120px, 28vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-soft), rgba(37, 99, 235, 0.16));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.home-avatar__initials {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--accent);
  line-height: 1;
}

.home-content {
  max-width: 680px;
}

.home-content .lead {
  margin: 0.25rem auto 0;
}

.home-intro-secondary {
  margin-top: 1rem;
}

.home-status {
  margin-top: 0.85rem;
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 38rem;
}

.home-status strong {
  font-weight: 600;
  color: var(--text);
}

.home-intro-cta {
  margin-top: 0.65rem;
  font-size: 0.98rem;
}

.home-intro-cta .link-inline {
  font-weight: 600;
}

.eportfolio-stack {
  margin-top: 2rem;
}

.card-link-row {
  margin-top: 0.6rem;
}

.project-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-card__bar {
  height: 4px;
  flex-shrink: 0;
  background: var(
    --project-strip,
    linear-gradient(90deg, var(--accent), #6366f1)
  );
}

.project-card--capstone {
  --project-strip: linear-gradient(90deg, #2563eb, #7c3aed);
}

.project-card--lunar {
  --project-strip: linear-gradient(90deg, #0ea5e9, #6366f1);
}

.project-card--aircraft {
  --project-strip: linear-gradient(90deg, #64748b, #334155);
}

.project-card__body {
  padding: 1.2rem 1.25rem;
}

.project-highlight {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.65rem;
  line-height: 1.45;
}

.project-card__extra {
  margin-top: 0.85rem;
}

.project-card__cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.project-detail-back {
  margin-bottom: 1.5rem;
}

.project-detail-back a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.project-detail-back a:hover {
  color: var(--accent);
}

.project-detail-title {
  margin-bottom: 2rem;
}

.project-detail-title h1 {
  margin-bottom: 0.5rem;
}

.project-detail-title .kicker {
  margin-bottom: 0.5rem;
}

.project-detail-section {
  margin-bottom: 2.75rem;
}

.project-detail-section:last-of-type {
  margin-bottom: 0;
}

.project-detail-section > h2 {
  margin-bottom: 0.75rem;
}

.project-detail-note {
  margin-bottom: 1rem;
}

.project-detail-section .lead {
  max-width: 100%;
}

.project-prose p + p {
  margin-top: 0.85rem;
}

.resource-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.resource-list li {
  margin-bottom: 0.6rem;
}

.resource-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--accent);
}

.resource-list a:hover {
  text-decoration: underline;
}

.resource-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 0.65rem;
}

.resource-card:last-child {
  margin-bottom: 0;
}

.resource-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kicker-color);
  margin-bottom: 0.35rem;
}

.resource-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.gallery-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem;
}

.gallery-item__media {
  width: 100%;
  height: clamp(6rem, 14vh, 9rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  box-sizing: border-box;
}

.gallery-item__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.gallery-item h3 {
  margin-top: 0.5rem;
  font-size: 0.92rem;
}

.gallery-item p {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.copy-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.14);
}

.copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.copy-btn[data-copied="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-status {
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 1.25rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.not-found {
  max-width: 520px;
  padding: 0 1rem;
}

.not-found-actions {
  margin-top: 1.75rem;
}

.home-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.skill-tags li {
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--tag-border);
  color: var(--text);
  white-space: normal;
  max-width: 100%;
}

.contact-wrapper {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.contact-wrapper .lead {
  margin: 0.5rem auto 0;
}

.contact-cards {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-card {
  width: 280px;
  text-align: center;
}

.fade-in {
  animation: fadeUp 0.5s ease both;
}

.fade-in.delay-1 {
  animation-delay: 0.08s;
}

.fade-in.delay-2 {
  animation-delay: 0.16s;
}

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

@media (max-width: 820px) {
  main {
    padding: 3rem 0 4rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .nav {
    padding: 0.8rem 0;
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 3.8rem);
  }

  h2 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .card {
    padding: 1.05rem 1.05rem;
  }

  .contact-card {
    width: 100%;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: rgba(30, 41, 59, 0.55);
    --surface-solid: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.14);
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --kicker-color: #94a3b8;
    --tag-border: rgba(96, 165, 250, 0.2);
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.38);
  }

  body {
    background:
      radial-gradient(circle at top left, rgba(96, 165, 250, 0.09), transparent 32%),
      linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
  }

  .site-header {
    background: rgba(15, 23, 42, 0.88);
  }

  .skip-link {
    background: var(--surface-solid);
    border-color: var(--line);
    color: var(--text);
  }

  .button.primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
  }

  .button.primary:hover {
    border-color: var(--accent);
  }

  .button:hover {
    border-color: rgba(241, 245, 249, 0.12);
  }

  .card:hover {
    border-color: rgba(241, 245, 249, 0.1);
  }

  .home-avatar {
    background: linear-gradient(145deg, var(--accent-soft), rgba(96, 165, 250, 0.18));
  }

  .copy-btn:hover {
    border-color: rgba(241, 245, 249, 0.14);
  }
}
