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

:root {
  --bg:          #F5F0E8;
  --bg-raised:   #EEE8DC;
  --surface:     #E6DDD0;
  --border:      #D4CABF;
  --border-lt:   #C2B8AA;

  --text:        #241F1A;
  --text-muted:  #7A7068;
  --text-dim:    #B0A89E;

  --sage:        #5E7A52;
  --sage-lt:     #8FA882;
  --sage-dim:    #C8D9C0;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  --max-w: 1080px;
  --nav-h: 60px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Utility ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-label::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--sage-lt);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 36px;
}

nav ul a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--text); }

.nav-cta {
  color: var(--sage) !important;
  border-bottom: 1px solid var(--sage-lt);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  color: var(--sage) !important;
  border-color: var(--sage) !important;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: var(--nav-h) 48px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 70% 60% at 20% 50%, rgba(94, 122, 82, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 100px 0 96px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  align-items: end;
}

.hero-main {}

.hero-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.hero-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--sage-lt);
}

.hero-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0;
}

.hero-inner h1 em {
  font-style: italic;
  color: var(--sage);
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 8px;
}

.hero-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  border-left: 1px solid var(--border-lt);
  padding-left: 20px;
}

.btn-primary {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 24px;
  border: 1px solid var(--border-lt);
  background: transparent;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  align-self: flex-start;
}

.btn-primary:hover {
  border-color: var(--sage-lt);
  color: var(--sage);
}

/* ── About ───────────────────────────────────────────────── */
.about {
  padding: 112px 48px;
  border-top: 1px solid var(--border);
  position: relative;
}

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

.about-text h2 { margin-bottom: 24px; }

.about-text p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.85;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.pillar:first-child { border-top: 1px solid var(--border); }

.pillar-num {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

.pillar p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Projects ────────────────────────────────────────────── */
.projects {
  padding: 112px 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.projects-header {
  margin-bottom: 64px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 460px;
  margin-top: 16px;
  line-height: 1.75;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--bg-raised);
  padding: 36px 32px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  transition: background 0.2s;
}

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

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

.card-num {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 400;
}

.card-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 3px 8px;
  border: 1px solid var(--border-lt);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}

.project-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.card-cta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-cta::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--sage-lt);
  transition: width 0.2s;
}

.project-card:hover .card-cta::after { width: 32px; }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-inner a:hover { color: var(--sage); }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 26, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-raised);
  border: 1px solid var(--border-lt);
  width: 100%;
  max-width: 1020px;
  max-height: 88vh;
  overflow: hidden;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: 1px solid var(--border-lt);
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: border-color 0.2s, color 0.2s;
}

.modal-close:hover { border-color: var(--text-muted); color: var(--text); }

.modal-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.modal-info {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
}

.modal-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-info h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.25;
}

#modal-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

.modal-detail {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}

.modal-detail strong { color: var(--text); font-weight: 500; }

.modal-prototype {
  background: var(--bg);
  display: flex;
  align-items: stretch;
}

.prototype-frame {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prototype-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 40px;
}

.placeholder-inner p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.placeholder-inner span {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

#modal-iframe {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-aside { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-info { border-right: none; border-bottom: 1px solid var(--border); }
  .prototype-frame { min-height: 300px; }
}

@media (max-width: 600px) {
  nav { padding: 0 24px; }
  nav ul { gap: 20px; }
  .hero { padding: 0 24px; }
  .about, .projects { padding: 72px 24px; }
  .container { padding: 0 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 0; }
  .modal { max-height: 100vh; border-radius: 0; }
}
