/* ═══════════════════════════════════════════════
   DEEP WATERS PORTFOLIO — style.css
   Sea-themed · Dark · Bioluminescent accents
   ═══════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
  --abyss:       #020c16;
  --deep:        #041a2e;
  --mid:         #062d4a;
  --shallow:     #0a4a72;
  --foam:        #a8d8ea;
  --biolume:     #00e5ff;
  --biolume-dim: rgba(0, 229, 255, 0.12);
  --pearl:       #dff0f7;
  --sand:        #c9a96e;
  --coral:       #ff6b6b;
  --text-muted:  rgba(168, 216, 234, 0.5);

  --font-display: 'Cormorant Garamond', serif;
  --font-mono:    'DM Mono', monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--abyss);
  color: var(--pearl);
  font-family: var(--font-mono);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Noise Texture Overlay ──────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

/* ── Ocean Canvas ───────────────────────────────── */
#ocean-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Custom Cursor ──────────────────────────────── */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--biolume);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px var(--biolume), 0 0 32px rgba(0,229,255,0.4);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), opacity 0.2s;
  mix-blend-mode: screen;
}
.cursor.hovering {
  width: 20px; height: 20px;
  opacity: 0.7;
}
.cursor-ring {
  position: fixed;
  width: 38px; height: 38px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), border-color 0.3s;
}
.cursor-ring.hovering {
  width: 56px; height: 56px;
  border-color: rgba(0,229,255,0.6);
}

/* ── Layout Helpers ─────────────────────────────── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  position: relative;
  z-index: 2;
}

section {
  padding: 8rem 0;
  position: relative;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--biolume);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 3rem;
  color: var(--foam);
}
.section-heading em {
  font-style: italic;
  color: var(--biolume);
}

/* ── Fade-up Animations ─────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--ease-out) forwards;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── NAV ────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 4rem;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(2, 12, 22, 0.72);
  border-bottom: 1px solid rgba(0, 229, 255, 0.06);
  transition: background 0.4s;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--foam);
}
.blink {
  color: var(--biolume);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--biolume);
  transition: width 0.35s var(--ease-out);
}
.nav-links a:hover { color: var(--pearl); }
.nav-links a:hover::after { width: 100%; }

.nav-depth {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.depth-label {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}
.depth-value {
  font-size: 0.75rem;
  color: var(--biolume);
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

/* ── HERO ────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  position: relative;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
  padding-top: 6rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--biolume);
  background: var(--biolume-dim);
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 2px;
  margin-bottom: 2rem;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--biolume);
  box-shadow: 0 0 8px var(--biolume);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--foam);
  margin-bottom: 1.5rem;
}
.hero-name em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--foam);
  opacity: 0.6;
}

.hero-title {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--foam);
  opacity: 0.7;
  max-width: 480px;
  margin-bottom: 3rem;
}

.hero-cta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--biolume);
  color: var(--abyss);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s;
  position: relative;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,229,255,0.35);
}

.btn-ghost {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border: 1px solid rgba(168, 216, 234, 0.25);
  color: var(--foam);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: border-color 0.3s, background 0.3s;
}
.btn-ghost:hover {
  border-color: var(--biolume);
  background: var(--biolume-dim);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 3rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
}
.hero-scroll span {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Depth meter */
.depth-meter {
  position: absolute;
  right: 4rem; top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.depth-track {
  width: 2px;
  height: 160px;
  background: rgba(168,216,234,0.1);
  position: relative;
  border-radius: 2px;
}
.depth-indicator {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(to bottom, var(--biolume), transparent);
  border-radius: 2px;
  transition: height 0.3s var(--ease-out);
}

/* ── ABOUT ──────────────────────────────────────── */
#about {
  background: linear-gradient(to bottom, transparent, rgba(4,26,46,0.6), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 6rem;
  align-items: center;
}

.about-body {
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(168, 216, 234, 0.8);
  margin-bottom: 3rem;
  max-width: 520px;
}

.about-stats {
  display: flex;
  gap: 3rem;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--biolume);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ── Jellyfish CSS illustration ─────────────────── */
.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.jellyfish-wrap {
  position: relative;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-20px); }
}
.jellyfish {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.jelly-cap {
  width: 140px;
  height: 90px;
  background: radial-gradient(ellipse at 40% 35%, rgba(0,229,255,0.35) 0%, rgba(0,229,255,0.08) 60%, transparent 100%);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 50% 50% 10% 10% / 80% 80% 20% 20%;
  position: relative;
  box-shadow: 0 0 40px rgba(0,229,255,0.15), inset 0 0 20px rgba(0,229,255,0.06);
}
.jelly-cap::before {
  content: '';
  position: absolute;
  top: 20%; left: 20%;
  width: 30%; height: 15%;
  background: rgba(0,229,255,0.2);
  border-radius: 50%;
  filter: blur(6px);
}
.jelly-tentacle {
  width: 1px;
  height: calc(60px + var(--i) * 15px);
  background: linear-gradient(to bottom, rgba(0,229,255,0.4), transparent);
  position: absolute;
  top: 85px;
  left: calc(20px + var(--i) * 20px);
  transform-origin: top;
  animation: tentacle 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.18s);
  border-radius: 0 0 2px 2px;
}
@keyframes tentacle {
  0%, 100% { transform: rotate(-8deg) scaleX(1); }
  50%       { transform: rotate(8deg) scaleX(1.5); }
}

/* ── SKILLS ─────────────────────────────────────── */
#skills {
  position: relative;
}
#skills::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,229,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: rgba(4, 26, 46, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.1);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--biolume), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.skill-card:hover {
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateY(-4px);
}
.skill-card:hover::before { opacity: 1; }

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.skill-icon {
  color: var(--biolume);
  font-size: 0.9rem;
}
.skill-card-header h3 {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--foam);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.skill-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: rgba(168,216,234,0.7);
}
.skill-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--biolume);
  flex-shrink: 0;
  opacity: 0.6;
}

/* ── WORK ────────────────────────────────────────── */
#work {
  background: linear-gradient(to bottom, transparent, rgba(4,26,46,0.4), transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: rgba(4, 26, 46, 0.7);
  border: 1px solid rgba(168, 216, 234, 0.08);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.project-card-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
}
.project-card:hover .project-card-bg { opacity: 0.06; }

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}
.project-type {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}
.project-year {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--foam);
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.project-desc {
  font-size: 0.78rem;
  line-height: 1.8;
  color: rgba(168,216,234,0.65);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.tag {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(168,216,234,0.15);
  color: var(--text-muted);
  border-radius: 2px;
}

.project-link {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: gap 0.3s, letter-spacing 0.3s;
}
.project-link:hover { letter-spacing: 0.25em; }

/* ── CONTACT ─────────────────────────────────────── */
#contact {
  position: relative;
}
#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(0,229,255,0.05) 0%, transparent 65%);
  pointer-events: none;
}

.contact-inner {
  text-align: center;
}
.contact-sub {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 300;
  color: var(--foam);
  border-bottom: 1px solid rgba(168,216,234,0.2);
  padding-bottom: 0.4rem;
  margin-bottom: 3rem;
  transition: color 0.3s, border-color 0.3s;
}
.contact-email:hover {
  color: var(--biolume);
  border-color: var(--biolume);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}
.social-link {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}
.social-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--biolume);
  transition: width 0.3s var(--ease-out);
}
.social-link:hover { color: var(--biolume); }
.social-link:hover::after { width: 100%; }

/* ── FOOTER ──────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(168, 216, 234, 0.06);
  padding: 2rem 4rem;
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.footer-coords { font-style: italic; }

/* ── Scroll Reveal ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { display: none; }
}
@media (max-width: 720px) {
  nav { padding: 1.2rem 2rem; }
  .nav-depth { display: none; }
  .nav-links { gap: 1.5rem; }
  #hero { padding: 0 2rem; }
  .section-inner { padding: 0 2rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 2rem; }
  footer { padding: 1.5rem 2rem; }
  .depth-meter { display: none; }
}