/* ===== MIRÓ PALETTE ===== */
:root {
  --green-deep: #2A5A4B;
  --green-muted: #3D7A65;
  --ochre: #D4B85A;
  --ochre-light: #E4CC7A;
  --charcoal: #1E1E1E;
  --off-white: #F2F0E9;
  --red: #C73E1D;
  --blue: #3A6EA5;
  --yellow: #E8C547;
  --purple: #6B4C7A;
  --white: #FFFFFF;
  --black: #000000;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--green-deep);
  color: var(--off-white);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}

::selection {
  background: var(--yellow);
  color: var(--charcoal);
}

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

/* ===== TEXTURE OVERLAY ===== */
.texture-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ===== FLOATING SHAPES ===== */
.shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.shape-1 {
  width: 180px;
  height: 180px;
  background: var(--red);
  border-radius: 60% 40% 70% 30% / 40% 50% 60% 50%;
  top: 15%;
  right: 8%;
  animation: float 12s ease-in-out infinite;
}

.shape-2 {
  width: 80px;
  height: 80px;
  background: var(--blue);
  border-radius: 50%;
  top: 25%;
  left: 12%;
  animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 40px;
  height: 40px;
  background: var(--yellow);
  border-radius: 50%;
  top: 60%;
  right: 20%;
  animation: float 8s ease-in-out infinite;
}

.shape-4 {
  width: 120px;
  height: 60px;
  background: var(--ochre);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  bottom: 15%;
  left: 5%;
  transform: rotate(-15deg);
  animation: float 14s ease-in-out infinite reverse;
}

.shape-5 {
  width: 24px;
  height: 24px;
  background: var(--purple);
  border-radius: 50%;
  top: 45%;
  left: 25%;
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(15px, -20px) rotate(5deg); }
  66% { transform: translate(-10px, 15px) rotate(-3deg); }
}

/* ===== CONNECTING LINES ===== */
.connecting-line {
  position: absolute;
  height: 1px;
  background: var(--off-white);
  opacity: 0.3;
  transform-origin: left center;
  pointer-events: none;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 0;
  transition: background var(--transition), padding var(--transition);
}

.nav.scrolled {
  background: var(--charcoal);
  padding: 16px 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--off-white);
  padding: 8px 14px;
  background: var(--charcoal);
  border-radius: 100px;
}

.nav-links {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--charcoal);
  border-radius: 100px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border-radius: 100px;
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--yellow);
  color: var(--charcoal);
}

.nav-links a::after {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--off-white);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 32px 120px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
}

.hero-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-photo-backdrop {
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--ochre);
  border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%;
  transform: rotate(-8deg) translate(20px, 20px);
}

.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 50% 45% 55% 50% / 55% 50% 45% 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid var(--off-white);
  filter: grayscale(30%) contrast(1.05);
  transition: all var(--transition);
}

.hero-photo:hover {
  filter: grayscale(0%) contrast(1.05);
  border-radius: 55% 45% 50% 55% / 50% 55% 45% 55%;
  transform: rotate(3deg);
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 24px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--off-white);
  margin-bottom: 36px;
  letter-spacing: -0.04em;
}

.hero-meta {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(242, 240, 233, 0.75);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-meta a {
  color: var(--off-white);
  border-bottom: 2px solid var(--yellow);
  transition: background var(--transition);
}

.hero-meta a:hover {
  background: var(--yellow);
  color: var(--charcoal);
}

.hero-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-social a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 18px;
  border: 2px solid var(--off-white);
  border-radius: 100px;
  transition: all var(--transition);
}

.hero-social a:hover {
  background: var(--off-white);
  color: var(--green-deep);
}

/* ===== SECTIONS ===== */
.section {
  padding: 140px 32px;
  position: relative;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-heading {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 64px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-green { background: var(--green-deep); color: var(--off-white); }
.section-ochre { background: var(--ochre); color: var(--charcoal); }
.section-ochre .section-heading,
.section-ochre .about-text p,
.section-ochre .about-text strong,
.section-ochre .sidebar-block li,
.section-ochre .sidebar-block h3,
.section-ochre .about-lead { color: var(--charcoal); }
.section-ochre .about-text p { color: rgba(30, 30, 30, 0.8); }
.section-ochre .sidebar-block { border-color: var(--charcoal); }
.section-ochre .sidebar-block li { border-color: rgba(30, 30, 30, 0.2); }
.section-ochre .sidebar-block:nth-child(1) { background: var(--off-white); }
.section-ochre .sidebar-block:nth-child(2) { background: var(--green-deep); color: var(--off-white); }
.section-ochre .sidebar-block:nth-child(2) h3,
.section-ochre .sidebar-block:nth-child(2) li { color: var(--off-white); border-color: rgba(255,255,255,0.2); }
.section-ochre .sidebar-block:nth-child(3) { background: var(--red); color: var(--off-white); }
.section-ochre .sidebar-block:nth-child(3) h3,
.section-ochre .sidebar-block:nth-child(3) li { color: var(--off-white); border-color: rgba(255,255,255,0.2); }

.section-offwhite { background: var(--off-white); color: var(--charcoal); }
.section-offwhite .section-heading,
.section-offwhite .work-body h3,
.section-offwhite .about-text strong { color: var(--charcoal); }
.section-offwhite .about-text p,
.section-offwhite .work-desc,
.section-offwhite .writing-excerpt,
.section-offwhite .writing-intro,
.section-offwhite .patents-intro { color: rgba(30, 30, 30, 0.75); }
.section-offwhite .timeline::before { background: var(--charcoal); }
.section-offwhite .work-item::before { border-color: var(--charcoal); background: var(--off-white); }
.section-offwhite .work-item { border-color: rgba(30, 30, 30, 0.12); }
.section-offwhite .work-year { color: var(--green-deep); }
.section-offwhite .work-role { color: var(--red); }
.section-offwhite .writing-piece { border-color: rgba(30, 30, 30, 0.12); }
.section-offwhite .writing-title { color: var(--charcoal); }
.section-offwhite .writing-title:hover { color: var(--green-deep); }
.section-offwhite .writing-venue { color: var(--red); }
.section-offwhite .writing-more a { border-color: var(--charcoal); color: var(--charcoal); }
.section-offwhite .writing-more a:hover { background: var(--charcoal); color: var(--off-white); }
.section-offwhite .patent-item { border-color: var(--charcoal); }
.section-offwhite .patent-badge { border-color: var(--charcoal); color: var(--charcoal); }
.section-offwhite .patent-title { color: var(--charcoal); }
.section-offwhite .patent-meta { color: rgba(30, 30, 30, 0.5); }
.section-offwhite .now-block { border-color: var(--charcoal); }
.section-offwhite .now-block:nth-child(1) { background: var(--green-deep); color: var(--off-white); }
.section-offwhite .now-block:nth-child(1) h3,
.section-offwhite .now-block:nth-child(1) p { color: var(--off-white); }
.section-offwhite .now-block:nth-child(2) { background: var(--ochre); }
.section-offwhite .now-block:nth-child(3) { background: var(--red); color: var(--off-white); }
.section-offwhite .now-block:nth-child(3) h3,
.section-offwhite .now-block:nth-child(3) p { color: var(--off-white); }
.section-offwhite .now-block:nth-child(4) { background: var(--blue); color: var(--off-white); }
.section-offwhite .now-block:nth-child(4) h3,
.section-offwhite .now-block:nth-child(4) p { color: var(--off-white); }
.section-offwhite .now-meta { color: rgba(30, 30, 30, 0.5); }
.section-offwhite .now-meta a { border-color: var(--green-deep); color: var(--charcoal); }
.section-offwhite .now-meta a:hover { background: var(--green-deep); color: var(--off-white); }

/* ===== ABOUT ===== */
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  font-size: 1.0625rem;
  line-height: 1.85;
  margin-bottom: 24px;
}

.about-text strong {
  font-weight: 800;
}

.about-lead {
  font-size: 1.25rem !important;
  line-height: 1.65 !important;
  font-weight: 500;
}

.about-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-block {
  padding: 36px;
  border: 3px solid var(--off-white);
  border-radius: 32px 48px 40px 36px;
  transition: transform var(--transition);
}

.sidebar-block:hover {
  transform: rotate(-1deg) translateY(-4px);
}

.sidebar-block h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

.sidebar-block ul {
  list-style: none;
}

.sidebar-block li {
  font-size: 0.9375rem;
  line-height: 1.65;
  padding: 14px 0;
  border-bottom: 2px solid rgba(242, 240, 233, 0.15);
}

.sidebar-block li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-block li:first-child {
  padding-top: 0;
}

/* ===== WORK / TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--off-white);
  opacity: 0.4;
  border-radius: 2px;
}

.work-item {
  padding: 40px 0;
  border-bottom: 2px solid rgba(242, 240, 233, 0.1);
  position: relative;
}

.work-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 48px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-deep);
  border: 3px solid var(--off-white);
  transition: background var(--transition), transform var(--transition);
}

.work-item:hover::before {
  background: var(--yellow);
  transform: scale(1.3);
}

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

.work-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.6;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-body h3 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.work-note {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.5;
  font-style: italic;
}

.work-role {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--yellow);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
}

.work-desc {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 680px;
}

/* ===== WRITING ===== */
.writing-intro {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 600px;
}

.writing-piece {
  padding: 28px 0;
  border-bottom: 2px solid rgba(242, 240, 233, 0.1);
  transition: padding-left var(--transition);
}

.writing-piece:hover {
  padding-left: 12px;
}

.writing-piece:last-child {
  border-bottom: none;
}

.writing-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.writing-title {
  font-size: 1.125rem;
  font-weight: 800;
  transition: color var(--transition);
}

.writing-venue {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
}

.writing-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.5;
}

.writing-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 600px;
}

.writing-more {
  margin-top: 40px;
}

.writing-more a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 20px;
  border: 2px solid var(--off-white);
  border-radius: 100px;
  transition: all var(--transition);
  display: inline-block;
}

.writing-more a:hover {
  background: var(--off-white);
  color: var(--green-deep);
}

/* ===== PATENTS ===== */
.patents-intro {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 600px;
}

.patent-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.patent-item {
  padding: 44px;
  border: 3px solid var(--off-white);
  border-radius: 40px 52px 48px 44px;
  background: rgba(242, 240, 233, 0.05);
  transition: transform var(--transition);
}

.patent-item:nth-child(2) {
  background: var(--blue);
  color: var(--off-white);
  border-color: var(--off-white);
}

.patent-item:nth-child(2) .patent-title,
.patent-item:nth-child(2) .patent-meta,
.patent-item:nth-child(2) .patent-badge {
  color: var(--off-white);
  border-color: var(--off-white);
}

.patent-item:hover {
  transform: rotate(1deg) translateY(-4px);
}

.patent-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border: 2px solid var(--off-white);
  border-radius: 100px;
  margin-bottom: 16px;
}

.patent-title {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 10px;
}

.patent-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

/* ===== NOW - MIRO BOARD ===== */
.now-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.now-block {
  padding: 44px;
  border: 3px solid var(--off-white);
  border-radius: 36px 52px 44px 40px;
  transition: transform var(--transition);
}

.now-block:nth-child(1) { background: var(--green-deep); }
.now-block:nth-child(2) { background: var(--ochre); }
.now-block:nth-child(3) { background: var(--red); }
.now-block:nth-child(4) { background: var(--blue); }

.now-block:nth-child(2) h3,
.now-block:nth-child(2) p {
  color: var(--charcoal);
}

.now-block:hover {
  transform: rotate(-1deg) scale(1.02);
}

.now-block h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.now-block p {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.now-meta {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.5;
  letter-spacing: 0.05em;
}

.now-meta a {
  border-bottom: 2px solid var(--yellow);
  transition: background var(--transition);
}

.now-meta a:hover {
  background: var(--yellow);
  color: var(--charcoal);
}

/* ===== FOOTER ===== */
.footer {
  padding: 100px 32px 80px;
  background: var(--charcoal);
  color: var(--off-white);
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-wordmark {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 40px;
  letter-spacing: -0.04em;
  opacity: 0.15;
}

.footer-inner p {
  font-size: 0.9375rem;
  opacity: 0.6;
  margin-bottom: 8px;
}

.footer-inner a {
  color: var(--yellow);
  border-bottom: 2px solid var(--yellow);
  transition: opacity var(--transition);
}

.footer-inner a:hover {
  opacity: 0.7;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
  
  .hero-photo-wrap {
    order: -1;
  }
  
  .hero-photo {
    width: 220px;
    height: 220px;
  }
  
  .hero-photo-backdrop {
    width: 240px;
    height: 240px;
  }
  
  .hero-meta {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-social {
    justify-content: center;
  }
  
  .about-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  
  .about-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .patent-list {
    grid-template-columns: 1fr;
  }
  
  .now-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 100px 24px;
  }
  
  .hero {
    padding: 140px 24px 80px;
  }
  
  .nav-inner {
    padding: 0 24px;
  }
  
  .footer {
    padding: 80px 24px 60px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 24px;
    right: 24px;
    flex-direction: column;
    background: var(--charcoal);
    border-radius: 16px;
    padding: 16px;
    gap: 4px;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links a {
    padding: 12px 16px;
    border-radius: 12px;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .about-sidebar {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .section-heading {
    font-size: 2rem;
  }
  
  .shape {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .shape {
    animation: none;
  }
}
