*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0d0f;
  --bg2: #111518;
  --bg3: #181d21;
  --bg4: #1f252a;
  --line: rgba(255,255,255,0.07);
  --line2: rgba(255,255,255,0.13);
  --text: #e8ecee;
  --muted: #7a8590;
  --accent: #5bc8d4;
  --accent2: #3da8b4;
  --tag-bg: rgba(91,200,212,0.08);
  --tag-border: rgba(91,200,212,0.22);
  --content-max: 900px;
  --content-gutter: clamp(1.25rem, 3vw, 3rem);
  --serif: 'Geist', system-ui, sans-serif;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  border-bottom: 1px solid var(--line);
  background: rgba(10,13,15,0.92);
  backdrop-filter: blur(12px);
}
.nav-name {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ─── HERO ────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 80px;
  border-bottom: 1px solid var(--line);
  width: min(var(--content-max), calc(100% - (2 * var(--content-gutter))));
  margin-inline: auto;
}
.hero-left {
  padding: 5.5rem 3rem 5.5rem 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}
.hero-title {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 300;
}
.hero-tenets {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0 0 2.25rem;
  max-width: 620px;
}
.hero-tenet {
  position: relative;
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.42;
  letter-spacing: 0;
  font-weight: 400;
  padding-left: 0.9rem;
  transition: color 0.2s ease;
}
.hero-tenet::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 1px;
  background: var(--accent);
  opacity: 0.45;
  transition: opacity 0.2s ease;
}
.hero-tenet:hover {
  color: var(--text);
}
.hero-tenet:hover::before,
.hero-tenet:focus-visible::before {
  opacity: 0.7;
}
.hero-tenet:focus-visible {
  outline: none;
  color: var(--text);
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  padding: 0.8rem 1.75rem;
  transition: background 0.2s;
}
.hero-cta:hover { background: var(--accent2); }

.hero-right {
  padding: 5.5rem 0 5.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.stat-row {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.stat-row:first-child { border-top: 1px solid var(--line); }
.stat-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── PHILOSOPHY ──────────────────────────────────── */

.section {
  padding: 6rem 5rem;
  border-bottom: 1px solid var(--line);
}
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line2);
}
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--line);
}
.phil-item {
  padding: 2.5rem;
  border-right: 1px solid var(--line);
}
.phil-item:last-child { border-right: none; }
.phil-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}
.phil-title {
  font-family: var(--sans);
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.phil-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── WORK ────────────────────────────────────────── */

.work-section {
  padding: 5rem 0 0;
  border-bottom: 1px solid var(--line);
  width: min(var(--content-max), calc(100% - (2 * var(--content-gutter))));
  margin-inline: auto;
}

.philo-group {
  margin-bottom: 2rem;
  padding: 0;
}
.philo-group-head {
  position: relative;
  margin: 0 0 1.1rem;
  padding: 0 0 0 1rem;
  border: none;
  background: transparent;
}
.philo-group-head::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 1px;
  background: var(--accent);
  opacity: 0.55;
}
.philo-group .phil-title { margin-bottom: 0.4rem; }

.philo-thesis {
  font-size: clamp(1.4rem, 2.1vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 0.45rem;
}
.philo-claim {
  max-width: 66ch;
  margin-bottom: 0;
}

.philo-group .case-study {
  margin-left: 0;
}
.philo-group .case-study:first-of-type {
  margin-top: 1.1rem;
}
.philo-group .case-study:last-child {
  margin-bottom: 0;
}

.philo-group.active .philo-group-head::before {
  opacity: 0.75;
}

.case-study {
  border-top: 1px solid var(--line);
  overflow: hidden;
  transition: background 0.3s;
}
.case-study:last-child { border-bottom: 1px solid var(--line); margin-bottom: 5rem; }

.case-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  cursor: pointer;
  padding: 2rem 2.5rem;
  user-select: none;
  transition: background 0.2s;
}
.case-header:hover { background: var(--bg2); }

.case-chevron {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s, transform 0.25s;
}
.case-chevron svg { display: block; }
.case-header:hover .case-chevron { color: var(--accent); }
.case-chevron.open { color: var(--accent); transform: rotate(90deg); }

.case-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 60px;
  background: var(--bg3);
  border: 1px solid var(--line2);
  position: relative;
  overflow: hidden;
}
.case-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
}
.case-header:hover .case-thumb { border-color: var(--line2); }

.case-main {
  flex: 1;
  padding: 0.5rem 0;
}
.case-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ─── TAGS ────────────────────────────────────────── */

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
  color: var(--accent);
}
.tag.blue {
  border-color: rgba(100,160,220,0.25);
  background: rgba(100,160,220,0.07);
  color: #8ab5e0;
}
.tag.green {
  border-color: rgba(100,200,130,0.25);
  background: rgba(100,200,130,0.07);
  color: #7dd4a0;
}
.tag.orange {
  border-color: rgba(220,140,80,0.25);
  background: rgba(220,140,80,0.07);
  color: #dca060;
}

/* ─── CASE STUDY BODY ─────────────────────────────── */

.case-title {
  font-family: var(--sans);
  font-size: 1.8rem;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  color: var(--text);
  letter-spacing: -0.025em;
  font-weight: 600;
}
.case-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
}
.case-body {
  display: none;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  padding: 3rem 2.5rem;
}
.case-body.open { display: block; }

.case-body-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.case-detail-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  margin-top: 1.75rem;
}
.case-detail-label:first-child { margin-top: 0; }
.case-detail-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}
.case-detail-text strong {
  color: var(--text);
  font-weight: 500;
}

.impact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.impact-list li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
}
.impact-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--tag-border);
  margin-top: 1.5rem;
  transition: all 0.2s;
}
.case-link:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.image-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
}
.image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
}
.img-label {
  position: relative;
  z-index: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line2);
  background: var(--bg2);
}

/* ─── SKILLS ──────────────────────────────────────── */

.skills-strip {
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4rem;
  align-items: start;
  width: min(var(--content-max), calc(100% - (2 * var(--content-gutter))));
  margin-inline: auto;
}
.skills-col { flex: 1; }
.skills-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.skills-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.skills-items span {
  font-size: 14px;
  color: var(--muted);
}

/* ─── CONTACT ─────────────────────────────────────── */

.contact-section {
  padding: 6rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.contact-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.contact-title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 300;
}
.contact-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.2s;
  color: var(--text);
}
.contact-link:first-child { border-top: 1px solid var(--line); }
.contact-link:hover { color: var(--accent); padding-left: 0.5rem; }
.contact-link-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-link-val {
  font-size: 15px;
  font-weight: 500;
}
.contact-link-arrow {
  color: var(--accent);
  font-size: 14px;
}

/* ─── FOOTER ──────────────────────────────────────── */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(var(--content-max), calc(100% - (2 * var(--content-gutter))));
  margin-inline: auto;
}
.footer-name,
.footer-url {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ─── SCROLL ANIMATION ────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-left {
    padding: 4rem 0 2.25rem;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .hero-right {
    padding: 2.25rem 0 3.25rem;
  }
  .philo-group {
    padding: 0;
  }
  .philo-group .case-study {
    margin-left: 0;
  }
  .philo-thesis {
    font-size: 1.25rem;
  }
  .case-header {
    padding: 1.35rem 1rem;
    gap: 1rem;
  }
  .case-body {
    padding: 2rem 1rem;
  }
  .case-body-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .skills-strip {
    flex-direction: column;
    gap: 2rem;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
