/* ── Fonts (self-hosted Inter) ────────────────────────────── */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #17181a;
  --surface: #1f2123;
  --text: #e9eaec;
  --text-muted: #9497a0;
  --accent: #f2f3f5;
  --border: #2b2d31;
  --card-hover: #26282b;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 64px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin-right: auto;
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

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

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 3rem 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Projects Grid ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 1.5rem;
}

.project-card {
  background: var(--bg);
  transition: background 0.15s;
}

.project-card:hover {
  background: var(--card-hover);
}

.card-link {
  display: block;
  padding: 0;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--border);
}

.placeholder-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.thumb-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-info {
  padding: 1rem 1.25rem 1.25rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.card-tags {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Interests ────────────────────────────────────────────── */
.interests-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.interests-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* always a single row of four */
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.interest-card {
  background: var(--bg);
  padding: 1.5rem;
  min-width: 0; /* let the four columns stay equal instead of stretching to text */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.15s;
}

.interest-card:hover {
  background: var(--card-hover);
}

.interest-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.interest-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── About ────────────────────────────────────────────────── */
.about-main {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}

.placeholder-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-photo span {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}

.about-role {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
}

.about-bio p {
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}

.skills-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 2rem 0 0.75rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-list li {
  font-size: 0.8rem;
  background: var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-main {
  flex: 1;
  padding: 4rem 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.contact-inner {
  width: 100%;
  max-width: 560px;
}

.contact-heading {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.contact-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--text);
}

.form-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

/* ── Shared Button ────────────────────────────────────────── */
.btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.8;
}

/* ── 3D Models Carousel ───────────────────────────────────── */
.models-section {
  display: none; /* revealed by JS only when screenshots are present */
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  width: 100%;
}

.models-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 420px;
}

/* Slides are absolutely stacked; JS positions them in a circular coverflow. */
.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  transform: translate(-50%, -50%);
  transition:
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.7s ease;
  will-change: transform, opacity;
}

.slide-inner {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.7s ease;
}

.carousel-slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

/* JS scales the focused slide up; the shadow makes the focus unmistakable. */
.carousel-slide.is-active .slide-inner {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

/* Prev / next controls */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  opacity: 0.85;
  transition:
    opacity 0.15s,
    background 0.15s;
}

.carousel-arrow:hover {
  opacity: 1;
  background: var(--card-hover);
}

.carousel-arrow.prev {
  left: 0.5rem;
}

.carousel-arrow.next {
  right: 0.5rem;
}

@media (max-width: 480px) {
  .carousel {
    height: 320px;
  }
  .carousel-slide {
    width: 220px;
  }
  .carousel-slide img {
    height: 220px;
  }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  margin-top: auto; /* pin footer to the bottom regardless of page length */
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0.9rem;
}

.footer-link {
  color: var(--text-muted);
  transition: color 0.15s;
}

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

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    padding: 0 1rem;
    gap: 1rem;
  }
  .logo {
    font-size: 0.9rem;
  }
  .nav {
    gap: 1rem;
  }

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

  .about-photo {
    max-width: 220px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 0.75rem;
  }
  .about-main,
  .contact-main {
    padding: 2rem 1rem;
  }
  .hero {
    padding: 2rem 1rem 1rem;
  }
  /* Four thin columns get cramped on phones — drop to a 2x2. */
  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
