@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');
@import "tailwindcss";

:root {
  --bg-deep: #0a0c0f;
  --bg-card: #111417;
  --bg-hover: #181c22;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, .15);
  --accent-glow: rgba(0, 229, 160, .35);
  --accent2: #00b4ff;
  --text-primary: #eef0f3;
  --text-secondary: #7a8290;
  --text-muted: #4e5560;
  --border: rgba(255, 255, 255, .06);
  --font-display: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: .35s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { color: inherit; }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--bg-deep);
}
.bg-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 18% 24%, rgba(0,229,160,.075) 0%, transparent 70%),
    radial-gradient(ellipse 55% 48% at 78% 60%, rgba(0,180,255,.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(140,60,255,.04) 0%, transparent 70%);
}
.noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.topbar {
  width: 100%;
  min-height: 74px;
  padding: 1.1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
  background: rgba(10,12,15,.7);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.brand {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -.01em;
}
.brand span { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
.portfolio-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.portfolio-link:hover { color: var(--accent); }
.sound-button {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: .62rem .95rem;
  display: flex;
  gap: .5rem;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition);
}
.sound-button:hover { color: var(--accent); border-color: rgba(0,229,160,.28); background: var(--accent-dim); }

.guide {
  flex: 1;
  width: min(1080px, calc(100% - 64px));
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "intro breath" "controls breath" "status breath";
  align-items: center;
  column-gap: 5rem;
  padding: 3.5rem 0;
  position: relative;
  z-index: 2;
}
.intro { grid-area: intro; align-self: end; }
.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.eyebrow i { width: 28px; height: 2px; background: var(--accent); border-radius: 2px; }
.intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6.5vw, 5.2rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.02em;
}
.intro h1 span { color: var(--accent); }
.subtitle { max-width: 430px; margin: 1.65rem 0 0; color: var(--text-secondary); line-height: 1.75; font-size: 1rem; }

.breath-area {
  grid-area: breath;
  justify-self: center;
  width: min(45vw, 500px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
}
.orbit { position: absolute; inset: 3%; border: 1px solid rgba(0,229,160,.12); border-radius: 50%; }
.orbit-one { animation: drift 14s ease-in-out infinite; box-shadow: inset 0 0 65px rgba(0,229,160,.018); }
.orbit-two { inset: 12%; border-color: rgba(0,180,255,.1); animation: drift 18s ease-in-out infinite reverse; }
.breath-circle {
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.1), transparent 30%),
    linear-gradient(145deg, rgba(0,229,160,.3), rgba(0,180,255,.12));
  border: 1px solid rgba(0,229,160,.3);
  box-shadow: 0 0 70px rgba(0,229,160,.2), inset 0 0 70px rgba(0,229,160,.08), 0 0 0 16px rgba(0,229,160,.025);
  transform: scale(.72);
  transition: transform 1s ease-in-out, background 1s ease;
  position: relative;
  z-index: 2;
}
.phase-inhale .breath-circle { transform: scale(1); transition-duration: 4s; }
.phase-hold .breath-circle { transform: scale(1); transition-duration: .3s; }
.phase-exhale .breath-circle { transform: scale(.72); transition-duration: 8s; }
.phase-complete .breath-circle { transform: scale(.83); }
.circle-content { width: 78%; display: flex; flex-direction: column; align-items: center; }
.phase-label { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 800; }
.count { font-family: var(--font-display); font-size: clamp(4rem, 8vw, 6.6rem); line-height: .98; font-weight: 900; color: var(--accent); margin: .15rem 0 .35rem; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px var(--accent-glow); }
.phase-hint { color: var(--text-secondary); font-size: .72rem; line-height: 1.5; }

.controls { grid-area: controls; align-self: center; display: flex; align-items: center; gap: 1rem; padding-top: 2rem; }
.primary-button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg-deep);
  padding: .78rem 1.65rem;
  min-width: 132px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: var(--transition);
}
.primary-button:hover { background: #00cc8e; box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-2px); }
.primary-button:active { transform: translateY(0); }
.primary-button span { font-size: .7rem; }
.reset-button { border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--text-secondary); cursor: pointer; padding: .72rem 1.2rem; font-size: .82rem; transition: var(--transition); }
.reset-button:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.cycle-status { grid-area: status; align-self: start; padding-top: 1.5rem; color: var(--text-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .13em; }
.cycle-dots { display: flex; gap: 7px; margin-top: .65rem; }
.cycle-dots i { display: block; width: 26px; height: 3px; border-radius: 9px; background: var(--bg-hover); transition: .4s; }
.cycle-dots i.active { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

footer {
  width: min(1080px, calc(100% - 64px));
  margin: 0 auto;
  padding: 1.2rem 0 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: .7rem;
  position: relative;
  z-index: 2;
}
footer p { margin: 0; }
footer b { color: var(--accent); }
footer span { margin: 0 .45rem; }

@keyframes drift {
  0%, 100% { transform: scale(1) rotate(0); border-radius: 50%; }
  50% { transform: scale(1.035) rotate(7deg); border-radius: 46% 54% 51% 49%; }
}
button:focus-visible, a:focus-visible { outline: 3px solid rgba(0,229,160,.32); outline-offset: 4px; }

@media (max-width: 760px) {
  .topbar { padding: 1rem 1.25rem; }
  .portfolio-link { display: none; }
  .guide, footer { width: min(100% - 32px, 600px); }
  .guide { display: flex; flex-direction: column; text-align: center; padding: 2rem 0 1.5rem; }
  .eyebrow { justify-content: center; margin-bottom: .8rem; }
  .intro h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .intro h1 br { display: none; }
  .subtitle { margin: 1rem auto 0; }
  .breath-area { width: min(100%, 380px); margin: .75rem auto 0; }
  .controls { padding-top: .15rem; justify-content: center; min-height: 48px; }
  .cycle-status { padding-top: 1.15rem; }
  .cycle-dots { justify-content: center; }
  footer { flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

