/* ===== VARIABLES ===== */
:root {
  --bg:      #07070e;
  --surface: #0e0e1c;
  --border:  rgba(255,255,255,0.07);
  --accent:  #00e0c4;
  --accent-d: rgba(0,224,196,0.08);
  --gold:    #c9a456;
  --text:    #eae5d8;
  --text-2:  #8a8397;
  --text-3:  rgba(234,229,216,0.18);
  --serif:   'Cormorant Garamond', Georgia, serif;
  --sans:    'DM Sans', system-ui, sans-serif;
  --mono:    'Space Mono', monospace;
  --max:     1160px;
  --px:      clamp(20px, 5vw, 64px);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Grain texture via pseudo-element */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
  animation: grain 7s steps(9) infinite;
}

@keyframes grain {
  0%   { background-position: 0 0; }
  11%  { background-position: 15% -20%; }
  22%  { background-position: -10% 30%; }
  33%  { background-position: 25% 10%; }
  44%  { background-position: -5% -25%; }
  55%  { background-position: 20% 20%; }
  66%  { background-position: -20% 5%; }
  77%  { background-position: 10% -15%; }
  88%  { background-position: -15% 25%; }
  100% { background-position: 0 0; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ===== SELECTION ===== */
::selection { background: var(--accent); color: var(--bg); }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ===== SECTION BASE ===== */
.s { padding: clamp(80px, 10vw, 140px) 0; }

.s-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.s-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.s-title em { font-style: italic; color: var(--text-2); }

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

/* ===== NAV ===== */
#nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;
  padding: 22px 0;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, padding 0.3s;
}
#nav.scrolled {
  background: rgba(7,7,14,0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
  padding: 14px 0;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 3px;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-cta {
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.nav-cta:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 600;
}
.burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:first-child  { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:last-child   { transform: rotate(-45deg) translate(5px, -4px); }

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 10% 75%, rgba(0,224,196,0.045) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 88% 18%, rgba(201,164,86,0.03) 0%, transparent 60%);
  pointer-events: none;
}
#mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  padding-top: 100px;
  width: 100%;
}

.hero-loc {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: up 0.8s ease both;
}
.live-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,224,196,0.5); }
  55%       { box-shadow: 0 0 0 7px rgba(0,224,196,0); }
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(4rem, 16vw, 16rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.hn1 {
  display: block;
  font-weight: 300;
  color: var(--text);
  animation: up 0.9s 0.08s ease both;
}
.hn2 {
  display: block;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  animation: up 0.9s 0.18s ease both;
}

.hero-tag {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.9rem);
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.4;
  margin-bottom: 28px;
  animation: up 0.9s 0.28s ease both;
}
.hero-tag em { color: var(--text); font-style: italic; }

.hero-roles {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 48px;
  animation: up 0.9s 0.38s ease both;
  line-height: 2.2;
}
.hero-roles span { color: var(--accent); margin: 0 12px; }

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: up 0.9s 0.48s ease both;
}

.btn-p, .btn-g {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.25s;
}
.btn-p {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
.btn-p:hover {
  background: #00c8b2;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,224,196,0.28);
}
.btn-g {
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-g:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: var(--px);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: up 1s 0.9s ease both;
}
.sh-line {
  width: 56px;
  height: 1px;
  background: var(--text-3);
  transform-origin: left;
  animation: grow 2.5s ease-in-out infinite;
}
@keyframes grow {
  0%   { transform: scaleX(0); opacity: 0; }
  45%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@keyframes up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ===== SOBRE ===== */
.sobre-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 80px;
  align-items: start;
}
.sobre-aside {
  position: sticky;
  top: 100px;
}
.deco-rings {
  width: 150px;
  height: 150px;
  color: var(--accent);
  opacity: 0.14;
  margin-top: 44px;
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sobre-h {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}
.sobre-h em { font-style: italic; color: var(--accent); }

.sobre-body p {
  font-size: 1.03rem;
  color: var(--text-2);
  line-height: 1.9;
  margin-bottom: 18px;
}

/* ===== WORKS ===== */
.works { border-top: 1px solid var(--border); }

.w-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 36px;
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: default;
}
.w-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(.23,1,.32,1);
}
.w-item:hover::before { transform: scaleY(1); }

.w-num {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1;
  padding-top: 10px;
  transition: color 0.35s;
  align-self: start;
}
.w-item:hover .w-num { color: var(--accent); }

.w-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.w-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.w-item:hover .w-title { color: var(--accent); }

.w-year {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.w-cat {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.w-desc {
  font-size: 0.94rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 18px;
  max-width: 580px;
}
.w-tech { display: flex; gap: 8px; flex-wrap: wrap; }
.w-tech span {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 3px 10px;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 2px;
  transition: border-color 0.25s, color 0.25s;
}
.w-item:hover .w-tech span {
  border-color: rgba(0,224,196,0.22);
  color: var(--text);
}

/* ===== STACK ===== */
.stack-table { border-top: 1px solid var(--border); }

.st-row {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 0 60px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background 0.25s;
}
.st-row:hover { background: rgba(0,224,196,0.018); }

.st-cat {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-top: 6px;
}
.st-items {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.2;
  transition: color 0.3s;
}
.st-row:hover .st-items { color: var(--text); }

/* ===== CONTATO ===== */
.contato-wrap { margin-bottom: 60px; }
.contato-h {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 8px 0 20px;
}
.contato-h em { font-style: italic; color: var(--accent); }
.contato-sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 440px;
  line-height: 1.75;
}

.contato-links { border-top: 1px solid var(--border); }
.c-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  gap: 20px;
  transition: padding-left 0.35s cubic-bezier(.23,1,.32,1);
}
.c-link:hover { padding-left: 14px; }

.cl-left {
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.cl-cat {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-width: 76px;
}
.cl-val {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  font-weight: 300;
  color: var(--text-2);
  transition: color 0.3s;
}
.c-link:hover .cl-val { color: var(--accent); }

.cl-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}
.cl-line {
  height: 1px;
  flex: 1;
  max-width: 180px;
  background: var(--border);
  transition: background 0.35s, max-width 0.45s cubic-bezier(.23,1,.32,1);
}
.c-link:hover .cl-line { background: var(--accent); max-width: 440px; }

.cl-right svg {
  color: var(--text-3);
  flex-shrink: 0;
  transition: color 0.3s, transform 0.3s;
}
.c-link:hover .cl-right svg { color: var(--accent); transform: translateX(5px); }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
footer p {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
}
.foot-links { display: flex; gap: 24px; }
.foot-links a {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-2);
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.foot-links a:hover { color: var(--accent); }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(.23,1,.32,1),
              transform 0.85s cubic-bezier(.23,1,.32,1);
}
.reveal.in { opacity: 1; transform: none; }

/* stagger works list */
.w-item:nth-child(2) { transition-delay: 0.07s; }
.w-item:nth-child(3) { transition-delay: 0.14s; }
.w-item:nth-child(4) { transition-delay: 0.21s; }
.w-item:nth-child(5) { transition-delay: 0.28s; }
.w-item:nth-child(6) { transition-delay: 0.35s; }

/* stagger stack rows */
.st-row:nth-child(2) { transition-delay: 0.08s; }
.st-row:nth-child(3) { transition-delay: 0.16s; }
.st-row:nth-child(4) { transition-delay: 0.24s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sobre-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .sobre-aside {
    position: static;
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .deco-rings { margin-top: 0; width: 80px; height: 80px; }
  .st-row { grid-template-columns: 110px 1fr; gap: 0 32px; }
}

@media (max-width: 768px) {
  .burger { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(7,7,14,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.23,1,.32,1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 0.9rem; padding: 14px 28px; }

  .w-item { grid-template-columns: 48px 1fr; gap: 0 20px; }
  .w-num  { font-size: 2.2rem; }

  .st-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .st-cat { padding-top: 0; }

  .cl-left  { flex-direction: column; gap: 4px; }
  .cl-line  { display: none; }

  .foot-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn-p, .btn-g { text-align: center; justify-content: center; }
  .hero-name { line-height: 0.9; }
}
