@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f7f7;
  --surface-strong: #efefef;
  --text: #1a1a1a;
  --muted: rgba(26, 26, 26, 0.7);
  --muted-secondary: rgba(26, 26, 26, 0.4);
  --accent: #ef4444;
  --accent-strong: #dc2626;
  --border: rgba(26, 26, 26, 0.1);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

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

.brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 8px;
  z-index: 20;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.hero {
  padding: 80px 0 64px;
}

.hero-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.vimeo-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: var(--radius);
}

.vimeo-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

.hero-left {
  display: grid;
  gap: 24px;
}

.hero-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  min-height: 180px;
  text-decoration: none;
  color: inherit;
  text-align: left;
}

.hero-box:hover {
  border-color: rgba(239, 68, 68, 0.4);
}

.hero-box-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-box-content {
  color: var(--muted);
  line-height: 1.7;
}

.hero-right {
  max-width: 620px;
}

.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 4vw, 4.5rem);
  line-height: 0.98;
  margin: 12px 0 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 0.8rem;
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hero-copy {
  margin: 0 0 32px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 560px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.primary-button:hover {
  transform: translateY(-1px);
}

.portfolio {
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.section-heading {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 2.6vw, 2.8rem);
  font-family: "Cormorant Garamond", Georgia, serif;
}

.portfolio-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-button {
  border: 1px solid rgba(26, 26, 26, 0.15);
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

.gallery-kind {
  display: none;
  margin: 10px 0 18px;
  font-size: 0.8rem;
  color: var(--muted-secondary);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.gallery-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-card {
  background: var(--surface);
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 0;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.3);
}

.gallery-top {
  font-weight: 700;
  margin-bottom: 18px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.08em;
}

.gallery-label {
  margin: 0 0 10px;
  color: var(--muted-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

.gallery-media {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface-strong);
  background-size: cover;
  background-position: center;
  border-radius: 0;
  margin-bottom: 16px;
  object-fit: cover;
}

.gallery-media.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.gallery-media.ratio-3-4 {
  aspect-ratio: 3 / 4;
}

.gallery-media.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.gallery-media.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.gallery-bottom {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.about {
  padding: 64px 0 72px;
}

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

.about-grid h2 {
  margin: 12px 0 20px;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline-line {
  position: absolute;
  left: 9px;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 24px 0 24px 24px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.timeline-item:first-child {
  opacity: 0;
  transform: translateY(24px);
}

.timeline-item.appear {
  animation: timeline-appear 0.9s ease-out forwards;
}

.timeline-item:last-child {
  border-bottom: none;
}

@keyframes timeline-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-dot {
  position: absolute;
  left: -11px;
  top: 34px;
  width: 18px;
  height: 18px;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-content {
  display: grid;
  gap: 6px;
}

.timeline-year,
.timeline-company,
.timeline-position {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.timeline-year {
  color: var(--accent);
  font-weight: 700;
}

.timeline-company {
  color: var(--text);
  font-weight: 700;
}

.timeline-position {
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer {
  padding: 40px 0 32px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.brand-footer {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  width: min(1100px, 100%);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 0;
  border: 1px solid rgba(26, 26, 26, 0.08);
  overflow: auto;
}

.modal-close {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  min-height: 420px;
}

.modal-left,
.modal-right {
  padding: 48px;
}

.modal-left {
  background: #f7f7f7;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.modal-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.modal-media iframe {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.modal-right {
  overflow-y: auto;
}

.modal-placeholder {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  background: rgba(255,255,255,0.05);
  border-radius: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 32px;
}

.modal-right h3 {
  margin-top: 0;
  margin-bottom: 20px;
}

.modal-right p {
  color: var(--muted);
  line-height: 1.8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .modal-content {
    max-height: 85vh;
  }

  .modal-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .modal-left {
    min-height: 300px;
    padding: 24px;
    order: -1;
  }

  .modal-right {
    padding: 24px;
  }

  .modal-placeholder {
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    min-height: 280px;
  }

  .modal-close {
    right: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .modal-backdrop {
    padding: 16px;
  }

  .modal-content {
    width: 100%;
    max-height: 90vh;
  }

  .modal-inner {
    min-height: auto;
  }

  .modal-left {
    min-height: 280px;
    padding: 16px;
  }

  .modal-right {
    padding: 16px;
  }

  .modal-right h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .modal-right p {
    font-size: 0.95rem;
  }

  .modal-placeholder {
    min-height: 240px;
  }

  .modal-close {
    right: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
}

.modal-right h3 {
  margin-top: 0;
  margin-bottom: 20px;
}

.modal-right p {
  line-height: 1.8;
  color: var(--muted);
}

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .modal-inner {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .portfolio-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-button {
    min-width: 140px;
  }
}

@media (max-width: 650px) {
  .hero-grid,
  .about-grid,
  .modal-inner {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .portfolio-controls {
    justify-content: space-between;
  }

  .filter-button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    flex-direction: column;
    gap: 0;
    padding: 16px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    display: none;
    width: 100%;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: var(--surface);
  }

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

