:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5c5c5c;
  --line: #e9e9e9;
  --accent: #222222;
  --accent-soft: #f4f4f4;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-family: inherit;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

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

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

.brand {
  position: relative;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  padding-bottom: 4px;
  transition: color 180ms ease, transform 180ms ease;
}

.brand::after,
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 4px;
  transition: color 180ms ease, transform 180ms ease;
}

.brand:hover,
.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.brand.active,
.nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

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

.hero {
  padding: 90px 0 62px;
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  max-width: 16ch;
}

.hero-copy {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
}

.cta-row {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-links {
  flex-direction: column;
  align-items: flex-start;
}

.contact-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: transform 160ms ease, color 160ms ease;
}

.contact-item-copy {
  padding: 0;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.contact-item:hover {
  transform: translateX(3px);
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease,
    border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  background: #000;
}

.btn-ghost {
  border-color: var(--line);
  background: var(--accent-soft);
}

.section {
  padding: 64px 0;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel.is-entering {
  animation: tab-panel-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tab-panel.is-leaving {
  animation: tab-panel-out 180ms ease both;
}

@keyframes tab-panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tab-panel-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.99);
  }
}

.section-head {
  margin-bottom: 22px;
}

.section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
}

.about-text,
.contact-copy {
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.timeline,
.project-grid,
.hobby-list {
  display: grid;
  gap: 16px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.meta {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.card ul a {
  color: var(--accent);
  text-decoration: none;
}

.card ul a:hover {
  text-decoration: underline;
}

.card-media {
  display: flex;
  margin: -20px -20px -20px 0;
  gap: 20px;
  align-items: stretch;
}

.card-media-visual {
  width: 30%;
  min-width: 120px;
  max-width: 320px;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
}

.card-media-visual--wide {
  width: 50%;
  max-width: 480px;
}

.card-media-visual--wide .card-media-img {
  object-fit: contain;
  background: var(--accent-soft);
}

.card-media-visual--fit-width {
  align-self: center;
}

.card-media-visual--fit-width .card-media-img {
  height: auto;
  object-fit: contain;
}

.card-media-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 0 20px 20px;
}

.card-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project a {
  margin-top: 12px;
  display: inline-flex;
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding: 28px 0 36px;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .project-grid,
  .hobby-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 72px;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .nav-links {
    justify-content: center;
    gap: 12px;
  }

  .section {
    padding: 52px 0;
  }

  .project-grid,
  .hobby-list {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 100%;
  }

  .card-media {
    margin: 0;
    gap: 12px;
    flex-direction: column;
  }

  .card-media-visual {
    width: 100%;
    margin-left: 0;
    border-radius: 8px;
  }

  .card-media-img {
    height: auto;
  }

  .card-media-body {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
