:root {
  --bg: #f7fafc;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --border: #dbe3ee;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 55%, #eef3f9 100%);
  color: var(--text);
  line-height: 1.65;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  gap: 1rem;
}

.nav-brand-area {
  padding-left: 0.75rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
}

.nav-list a.nav-highlight {
  color: var(--accent);
  font-weight: 700;
}

.nav-list a.nav-highlight:hover,
.nav-list a.nav-highlight:focus-visible {
  color: var(--accent-hover);
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.profile-image {
  width: 100%;
  max-width: 360px;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
  justify-self: end;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin: 0.8rem 0 1rem;
}

.hero-text {
  color: var(--muted);
  max-width: 65ch;
}

.cta-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}

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

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

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

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

.section {
  padding: 2.25rem 0;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

h3 {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.section-lead {
  color: var(--muted);
  margin: -0.35rem 0 1.1rem;
  max-width: 70ch;
}

.subsection-title {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.skill-grid {
  align-items: stretch;
}

.skill-tier h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.skill-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.skill-name {
  font-weight: 700;
}

.skill-level {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  align-self: start;
}

.skill-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.section-tight {
  margin-top: 1rem;
}

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

.inline-tags li {
  font-size: 0.88rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.project-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.project-card-link:hover,
.project-card-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.project-card-thumb-wrap {
  display: block;
  margin: -0.15rem -0.15rem 0.75rem;
  border-radius: 0.55rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
  aspect-ratio: 16 / 9;
}

.project-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  min-height: 7.5rem;
}

.project-card-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.project-card-teaser {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 0.75rem;
  flex-grow: 1;
}

.project-card-cta {
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
}

.upcoming-card h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.project-page {
  padding: 2rem 0 3rem;
}

.project-back {
  margin: 0 0 0.5rem;
}

.project-back a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.project-back a:hover {
  text-decoration: underline;
}

.project-meta {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.project-tools {
  margin: 0 0 1.25rem;
}

.project-body p:last-child {
  margin-bottom: 0;
}

.project-figure {
  margin: 1.5rem 0;
}

.project-figure img {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.project-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.project-proof {
  margin-top: 2rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 1.35rem 0 2.25rem;
  margin-top: 0;
}

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

.footer-name {
  font-weight: 800;
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.footer-nav a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-radius: 0.8rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}

.stack,
.meta {
  color: var(--muted);
}

.form-success-banner {
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid #86efac;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
  max-width: 680px;
  margin-bottom: 1rem;
}

.contact-form {
  display: grid;
  gap: 0.7rem;
  max-width: 680px;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.72rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #bae6fd;
  border-color: #7dd3fc;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: #ffffff;
  padding: 0.6rem 0.7rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: none;
}

.to-top.show {
  display: block;
}

@media (max-width: 860px) {
  .nav-wrap {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .nav-list {
    flex-wrap: wrap;
  }

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

  .grid-projects {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .profile-image {
    justify-self: start;
    max-width: 280px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1024px) and (min-width: 861px) {
  .grid-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
