:root {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #a3a3a3;
  --paper: #101010;
  --surface: #181818;
  --accent: #ff7657;
  --accent-dark: #ff9b85;
  --sage: #222222;
  --line: #343434;
  --shadow: none;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.logo {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1;
}

.logo a {
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.nav-list a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-list a:hover,
.nav-list a:active,
.nav-list a[aria-current="page"] {
  color: var(--ink);
}

.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-main {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 210px);
  margin: 0 auto;
  padding: 76px 0 96px;
}

.page-title,
.about-text h2,
.blog-card h2,
.project-name {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.page-title {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.98;
}

.eyebrow,
.project-label,
.blog-meta {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-intro {
  max-width: 700px;
  margin: 28px 0 58px;
  color: var(--muted);
  font-size: 1.15rem;
}

.about {
  display: flex;
  align-items: center;
  gap: clamp(40px, 8vw, 100px);
  margin-top: 64px;
}

.about-image {
  flex: 0 0 clamp(240px, 32vw, 360px);
}

.about-image img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  max-width: 560px;
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.about-text p:not(.eyebrow) {
  color: var(--muted);
}

.button-row,
.title-row {
  display: flex;
  align-items: center;
  gap: 28px;
}

.button-row {
  margin-top: 32px;
}

.button,
input[type="submit"] {
  display: inline-block;
  padding: 13px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover,
input[type="submit"]:hover {
  color: var(--ink);
  background: transparent;
  transform: translateY(-2px);
}

.button-secondary {
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover {
  color: var(--surface);
  background: var(--ink);
}

.text-link {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--ink);
}

.project {
  display: flex;
  max-width: 790px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-image {
  display: flex;
  flex: 0 1 55%;
  align-items: center;
  padding: clamp(28px, 5vw, 58px);
  background: var(--sage);
}

.project-image img {
  border-radius: 12px;
  box-shadow: none;
  transition: opacity 180ms ease;
}

.project-image:hover img {
  opacity: 0.82;
}

.project-details {
  flex: 1;
  padding: clamp(34px, 6vw, 70px);
}

.project-name {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.project-description {
  margin-bottom: 26px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: start;
}

.contact-copy .page-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.form-note {
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 0.9rem;
}

#contact-form {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #4d4d4d;
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.blog-card {
  max-width: 790px;
  padding: clamp(30px, 6vw, 60px);
  border-top: 1px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.blog-card h2 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.blog-card p:not(.blog-meta) {
  color: var(--muted);
  font-size: 1.05rem;
}

.title-row {
  justify-content: space-between;
  margin-bottom: 54px;
}

.resume {
  padding: clamp(34px, 7vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section {
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: 38px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.section:first-child {
  padding-top: 0;
  border-top: 0;
}

.section:last-child {
  padding-bottom: 0;
}

.section > .entry {
  grid-column: 2;
}

.section-title {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.entry-info {
  margin: 3px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.entry-description {
  margin: 0;
  color: var(--muted);
}

.entry + .entry {
  margin-top: 26px;
}

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

.split-section > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr);
  gap: 24px;
}

.course-list,
.skill-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 800px) {
  .navbar,
  .about,
  .project,
  .title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .navbar {
    gap: 22px;
  }

  .nav-list {
    gap: 9px 20px;
  }

  .site-main {
    padding: 60px 0 82px;
  }

  .about-image {
    width: min(300px, 80vw);
  }

  .project-image {
    width: 100%;
  }

  .contact-layout,
  .section,
  .split-section,
  .split-section > div {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    gap: 42px;
  }

  .section,
  .split-section > div {
    gap: 14px;
  }

  .section > .entry {
    grid-column: 1;
  }

  .title-row {
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .navbar,
  .site-main,
  .footer {
    width: min(100% - 28px, 1120px);
  }

  .nav-list {
    font-size: 0.9rem;
  }

  .button-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .resume {
    padding: 28px 22px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
