@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&display=swap');

:root {
  --bg: #0a0a12;
  --bg-1: #0e0e1a;
  --bg-2: #141424;
  --grid-color: rgba(255, 255, 255, 0.04);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.10);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #eaedf3;
  --text-secondary: rgba(234, 237, 243, 0.5);
  --accent: #6ee7b7;
  --accent-glow: rgba(110, 231, 183, 0.12);
  --accent-2: #818cf8;
  --accent-2-glow: rgba(129, 140, 248, 0.10);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --danger: #ff5c5c;
  --success: #6ee7b7;
  --warning: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font-display: 'Sora', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  /* Liquid glass vars */
  --glass-blur: 18px;
  --glass-contrast: 1.4;
  --glass-highlight: rgba(255, 255, 255, 0.7);
  --glass-shadow: rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 5%, rgba(110, 231, 183, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 90%, rgba(129, 140, 248, 0.07), transparent 60%),
    linear-gradient(0deg, transparent 24%, var(--grid-color) 25%, var(--grid-color) 26%, transparent 27%, transparent 74%, var(--grid-color) 75%, var(--grid-color) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, var(--grid-color) 25%, var(--grid-color) 26%, transparent 27%, transparent 74%, var(--grid-color) 75%, var(--grid-color) 76%, transparent 77%, transparent);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
  background-attachment: fixed, fixed, scroll, scroll;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

code {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
}

/* ── Liquid Glass ──────────────────────── */

.fx-layer {
  filter: contrast(var(--glass-contrast));
  isolation: isolate;
}

.glass {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow:
    inset 2px -2px 2px -1px rgba(255, 255, 255, 0.08),
    inset -2px 2px 2px -1px rgba(255, 255, 255, 0.08),
    inset 6px -6px 4px -4px rgba(255, 255, 255, 0.04),
    inset -6px 6px 4px -4px rgba(255, 255, 255, 0.04),
    0 8px 32px var(--glass-shadow);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.04) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 2px -2px 2px -1px rgba(255, 255, 255, 0.12),
    inset -2px 2px 2px -1px rgba(255, 255, 255, 0.12),
    inset 6px -6px 4px -4px rgba(255, 255, 255, 0.06),
    inset -6px 6px 4px -4px rgba(255, 255, 255, 0.06),
    0 12px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

/* Glass inner content above pseudo-elements */
.glass > * { position: relative; z-index: 2; }

/* Glass button */
.glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow:
    inset 1px -1px 1px rgba(255, 255, 255, 0.06),
    inset -1px 1px 1px rgba(255, 255, 255, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.glass-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow:
    inset 1px -1px 2px rgba(255, 255, 255, 0.15),
    inset -1px 1px 2px rgba(255, 255, 255, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Accent glass button */
.glass-btn.accent {
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.15), rgba(129, 140, 248, 0.12));
  border-color: rgba(110, 231, 183, 0.25);
  color: var(--accent);
}

.glass-btn.accent:hover {
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.25), rgba(129, 140, 248, 0.18));
  border-color: rgba(110, 231, 183, 0.4);
}

/* ── Buttons ───────────────────────────── */

button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-link:hover { transform: translateY(-2px); }

.primary {
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.primary:hover { box-shadow: 0 8px 32px rgba(110, 231, 183, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3); }

.ghost, .secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}

.ghost:hover, .secondary:hover { background: var(--surface-hover); border-color: rgba(255, 255, 255, 0.2); }

/* ── Topbar ────────────────────────────── */

/* ── Nav Dock (floating pill container) ── */

main, .footer {
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.nav-dock {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 14px 1rem 0;
  pointer-events: none;
}

.nav-dock-spacer {
  height: 80px;
  flex-shrink: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  width: min(820px, 100%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  background: rgba(20, 20, 36, 0.35);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.06),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: all;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.topbar.scrolled {
  background: rgba(20, 20, 36, 0.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -1px 1px rgba(0, 0, 0, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.brand-sub { display: none; }

.nav {
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav a {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav a.active {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(110, 231, 183, 0.3);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.actions, .hero-cta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── Language Switch ───────────────────── */

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lang-switch button {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
}

.lang-switch button:hover { transform: none; background: var(--surface); }

.lang-switch button.active {
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ── Hero ──────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 2rem;
  min-height: 65vh;
}

.hero-copy { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
}

.eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

h1 .accent-text { color: var(--accent); }

.lead {
  font-size: 1.1rem;
  max-width: 52ch;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-cta { margin-bottom: 2.5rem; }

.stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Hero Panel — Terminal Card */
.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow:
    inset 1px -1px 1px rgba(255, 255, 255, 0.04),
    inset -1px 1px 1px rgba(255, 255, 255, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.3);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.panel-dots {
  display: flex;
  gap: 5px;
}

.panel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.panel-dots span:nth-child(1) { background: #ff5c5c; }
.panel-dots span:nth-child(2) { background: #ffc857; }
.panel-dots span:nth-child(3) { background: #00d4aa; }

.panel-header span:last-child {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.panel-body {
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
}

.panel-line {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  animation: lineIn 0.4s ease forwards;
}

.panel-line:nth-child(1) { animation-delay: 0.2s; }
.panel-line:nth-child(2) { animation-delay: 0.5s; }
.panel-line:nth-child(3) { animation-delay: 0.8s; }
.panel-line:nth-child(4) { animation-delay: 1.1s; }
.panel-line:nth-child(5) { animation-delay: 1.4s; }

.panel-prompt { color: var(--accent); user-select: none; }
.panel-cmd { color: var(--text); }
.panel-output { color: var(--accent-2); }
.panel-comment { color: var(--text-secondary); }

@keyframes lineIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Sections ──────────────────────────── */

.section {
  padding: 3.5rem 0;
  position: relative;
  z-index: 1;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 60ch;
}

/* ── About / Skills ────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.about-card {
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  transition: all 0.35s;
}

.about-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-tag {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(110, 231, 183, 0.08);
}

/* ── Portfolio Grid ────────────────────── */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.portfolio-intro {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.5rem;
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.portfolio-intro-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.portfolio-intro-copy p:last-child {
  color: var(--text-secondary);
  max-width: 62ch;
}

.portfolio-intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.portfolio-stat {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  text-align: center;
}

.portfolio-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  color: var(--accent);
}

.portfolio-stat span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.portfolio-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 231, 183, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.portfolio-thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  transition: transform 0.4s;
}

.portfolio-item:hover .portfolio-thumb { transform: scale(1.05); }

.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  background: linear-gradient(to top, rgba(8, 8, 14, 0.95) 0%, rgba(8, 8, 14, 0.4) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s;
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.portfolio-overlay h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.portfolio-overlay p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.portfolio-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}

.portfolio-year {
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.portfolio-summary {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(234, 237, 243, 0.88);
}

.portfolio-meta {
  margin-top: 0.7rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ── CTA Section ───────────────────────── */

.cta-section {
  margin: 2rem 0;
  padding: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(110, 231, 183, 0.06), rgba(129, 140, 248, 0.06)),
    rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.cta-section p {
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ── Footer ────────────────────────────── */

.footer {
  margin: 2rem auto 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* ── Login Page ────────────────────────── */

.auth-page {
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 2rem;
}

.auth-copy, .auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.auth-copy {
  padding: clamp(2rem, 4vw, 3rem);
}

.auth-copy-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-note {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.auth-note p { color: var(--text-secondary); font-size: 0.9rem; }
.auth-note p:last-child { margin-bottom: 0; }
.notice-title { font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }

.auth-card { padding: 1.8rem; }

.auth-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.back-link { color: var(--accent); font-size: 0.9rem; }

.badge {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.auth-form { display: grid; gap: 1rem; }

.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 500; }

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-error {
  min-height: 1rem;
  color: var(--danger);
  font-size: 0.82rem;
}

.form-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.checkbox {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }

.form-status {
  min-height: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-status[data-tone="error"] { color: var(--danger); }
.form-status[data-tone="success"] { color: var(--success); }

.auth-submit { width: 100%; padding: 0.9rem; }

.text-button {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.88rem;
}

.text-button:hover { transform: none; text-decoration: underline; }

/* ── Drive / File Manager ──────────────── */

.drive-page {
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.drive-gate {
  margin-top: 3rem;
  text-align: center;
}

.drive-gate .auth-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem;
}

.drive-gate h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.drive-gate .lead { margin: 0 auto 1.5rem; }

.drive-shell { display: grid; gap: 1.2rem; }

/* Drive Toolbar */
.drive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  flex-wrap: wrap;
}

.drive-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
}

.drive-breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

.drive-breadcrumb a:hover { color: var(--accent); }
.drive-breadcrumb .sep { color: var(--text-secondary); opacity: 0.4; }
.drive-breadcrumb .current { color: var(--text); font-weight: 500; }

.drive-actions {
  display: flex;
  gap: 0.5rem;
}

.drive-actions button {
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Drive Body */
.drive-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.2rem;
  min-height: 60vh;
}

.drive-sidebar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
}

.drive-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.drive-sidebar-item:hover { background: var(--surface-hover); color: var(--text); }
.drive-sidebar-item.active { background: var(--accent-glow); color: var(--accent); }

.drive-sidebar-item .icon { font-size: 1.1rem; width: 1.5rem; text-align: center; }

.drive-sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 0.6rem 0;
}

.drive-storage {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.storage-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin: 0.6rem 0 0.4rem;
  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width 0.5s;
}

.storage-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Drive File Grid */
.drive-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem;
}

.drive-section-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.drive-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: transparent;
  width: 100%;
  font-family: var(--font-body);
}

.drive-item:hover {
  background: var(--surface-hover);
  border-color: var(--line);
}

.drive-item.selected {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.drive-item-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.drive-item-name {
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
}

.drive-item-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.drive-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
  text-align: center;
  gap: 0.8rem;
}

.drive-empty .icon { font-size: 3rem; opacity: 0.3; }

/* ── Modal ─────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  padding: 1.8rem;
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
}

.modal .field { margin-bottom: 0.8rem; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

/* ── Upload zone ───────────────────────── */

.upload-zone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 1rem;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-zone .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-zone p { color: var(--text-secondary); font-size: 0.88rem; }

/* ── File list (table view) ────────────── */

.drive-list {
  display: grid;
  gap: 0.4rem;
}

.drive-list-header, .drive-list-row {
  display: grid;
  grid-template-columns: 1fr 100px 140px 60px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.drive-list-header {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.drive-list-row {
  cursor: pointer;
  transition: background 0.2s;
}

.drive-list-row:hover { background: var(--surface-hover); }

.drive-list-row .name-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.drive-list-row .name-cell .icon { font-size: 1.2rem; }

.drive-list-row .delete-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.drive-list-row .delete-btn:hover { color: var(--danger); background: rgba(255, 92, 92, 0.1); }

/* ── User pill ─────────────────────────── */

.user-pill {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

/* ── Dashboard KPIs (kept for drive stats) ── */

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.dashboard-intro {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.8rem;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.dashboard-kpis .stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem;
}

/* ── Scrollbar ─────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ── iOS 26 Bottom Tab Bar ──────────────── */

.bottom-tab {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  justify-content: center;
  padding: 0 1rem calc(env(safe-area-inset-bottom, 0px) + 10px);
  pointer-events: none;
}

.bottom-tab-indicator {
  position: absolute;
  bottom: 8px;
  height: 44px;
  background: rgba(110, 231, 183, 0.15);
  border-radius: 999px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 0;
}

.bottom-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 16px 6px;
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-width: 56px;
  text-decoration: none;
  pointer-events: all;
  z-index: 1;
}

.bottom-tab-item svg {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(1);
}

.bottom-tab-item span {
  font-size: 0.62rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(1);
}

.bottom-tab-item:hover {
  color: var(--text);
}

.bottom-tab-item.active {
  color: var(--accent);
}

.bottom-tab-item.active svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(110, 231, 183, 0.5));
}

.bottom-tab-item.active span {
  color: var(--accent);
  transform: scale(1.05);
}

/* ── Responsive ────────────────────────── */

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: none;
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 200;
  flex-shrink: 0;
}

.hamburger:hover { background: var(--surface-hover); transform: none; }

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-nav-overlay.open { opacity: 1; pointer-events: all; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  z-index: 160;
  padding: 5rem 1.5rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav.open { right: 0; }

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.mobile-nav a:hover, .mobile-nav a.active {
  color: var(--text);
  background: var(--surface);
}

.mobile-nav .nav-divider {
  height: 1px;
  background: var(--line);
  margin: 0.5rem 0;
}

.mobile-nav .mobile-lang-switch {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem 0;
}

.mobile-nav .mobile-lang-switch button {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.mobile-nav .mobile-lang-switch button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.mobile-nav .mobile-auth {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Tablet (≤ 980px) ──────────────────── */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 2rem 0 1.5rem; }
  .hero-panel { max-width: 500px; }
  .about-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .drive-body { grid-template-columns: 1fr; }
  .drive-sidebar { display: none; }
  .cta-section { flex-direction: column; text-align: center; }
  .stats { gap: 1.5rem; }
}

/* ── Mobile (≤ 768px) ──────────────────── */

@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }
  .mobile-nav-overlay, .mobile-nav { display: block; }
  .mobile-nav { display: flex; }

  .topbar .nav { display: none; }
  .topbar .lang-switch { display: none; }
  .topbar .actions { display: none; }

  /* Show bottom tab bar, hide hamburger */
  .bottom-tab {
    display: flex;
    gap: 2px;
    padding: 4px 6px calc(env(safe-area-inset-bottom, 0px) + 8px);
    margin: 0 auto calc(env(safe-area-inset-bottom, 0px) + 8px);
    width: auto;
    max-width: 320px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    background: rgba(20, 20, 36, 0.3);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.05),
      0 -4px 24px rgba(0, 0, 0, 0.25),
      0 4px 16px rgba(0, 0, 0, 0.2);
  }

  .bottom-tab-item {
    flex: 1;
    min-width: 0;
    padding: 6px 8px 4px;
  }

  /* Bottom padding for content to avoid tab bar */
  main { padding-bottom: 80px; }
  .footer { margin-bottom: 80px; }
  .drive-page { margin-bottom: 80px; }
  .auth-page { padding-bottom: 80px; }

  /* Hide hamburger since bottom tab replaces it */
  .hamburger { display: none !important; }

  /* Topbar compact */
  .topbar {
    padding: 0.45rem 0.5rem 0.45rem 0.8rem;
    gap: 0.4rem;
  }

  .nav-dock { padding: 10px 0.75rem 0; }
  .nav-dock-spacer { height: 68px; }

  .brand-name { font-size: 0.88rem; }
  .brand-sub { font-size: 0.7rem; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 0.8rem; }

  /* Hero mobile */
  .hero { padding: 1.5rem 0 1rem; }

  h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
    max-width: none;
    margin-bottom: 0.8rem;
  }

  .lead {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2rem;
  }

  .hero-cta .button-link {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
  }

  .stats {
    display: flex;
    gap: 0;
    justify-content: space-between;
  }

  .stat {
    flex: 1;
    text-align: center;
    padding: 0.8rem 0.4rem;
  }

  .stat strong { font-size: 1.3rem; }
  .stat span { font-size: 0.72rem; }

  /* Hero panel mobile */
  .hero-panel {
    margin-top: 1rem;
    border-radius: var(--radius);
  }

  .panel-body { padding: 1rem; font-size: 0.78rem; }

  /* Sections mobile */
  .section { padding: 2.5rem 0; }
  .section-head { margin-bottom: 1.5rem; }
  .section-head h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .section-head p { font-size: 0.9rem; }

  /* About cards mobile */
  .about-card {
    padding: 1.3rem;
    border-radius: var(--radius);
  }

  .about-card h3 { font-size: 1rem; }
  .about-card p { font-size: 0.88rem; }

  .skill-tags {
    gap: 0.4rem;
    margin-top: 1.2rem;
  }

  .skill-tag {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }

  /* Portfolio mobile */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .portfolio-item { border-radius: var(--radius-sm); }

  .portfolio-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(8, 8, 14, 0.9) 0%, transparent 80%);
    padding: 0.8rem;
  }

  .portfolio-overlay h3 { font-size: 0.88rem; }
  .portfolio-overlay p { font-size: 0.75rem; }
  .portfolio-tag { font-size: 0.68rem; padding: 0.15rem 0.5rem; }

  /* CTA mobile */
  .cta-section {
    padding: 1.5rem;
    border-radius: var(--radius);
    gap: 1rem;
  }

  .cta-section h2 { font-size: 1.3rem; }
  .cta-section p { font-size: 0.88rem; }
  .cta-section .hero-cta { width: 100%; }

  /* Footer mobile */
  .footer {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    padding: 1.2rem 0;
  }

  .footer-links { justify-content: center; gap: 0.8rem; }

  /* Auth pages mobile */
  .auth-page { padding: 1rem 0; }
  .auth-shell { gap: 1rem; }
  .auth-copy { padding: 1.5rem; border-radius: var(--radius); }
  .auth-card { padding: 1.3rem; border-radius: var(--radius); }
  .auth-copy h1 { font-size: clamp(2rem, 8vw, 2.8rem); }

  .field input {
    padding: 0.8rem;
    font-size: 1rem; /* prevents iOS zoom */
    border-radius: 12px;
  }

  .auth-submit {
    padding: 0.85rem;
    font-size: 1rem;
  }

  /* Drive mobile */
  .drive-page { margin-bottom: 1rem; }

  .drive-toolbar {
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    gap: 0.6rem;
  }

  .drive-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .drive-actions button {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
  }

  .drive-content {
    padding: 0.8rem;
    border-radius: var(--radius-sm);
  }

  .drive-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
  }

  .drive-item {
    padding: 0.8rem 0.5rem;
    border-radius: 10px;
  }

  .drive-item-icon { font-size: 1.8rem; }
  .drive-item-name { font-size: 0.75rem; }
  .drive-item-meta { font-size: 0.68rem; }

  .drive-empty { padding: 2rem 1rem; }
  .drive-empty .icon { font-size: 2.5rem; }
  .drive-empty h3 { font-size: 1rem; }
  .drive-empty p { font-size: 0.85rem; }

  .drive-list-header, .drive-list-row {
    grid-template-columns: 1fr 70px 40px;
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
  }

  .drive-list-header > span:nth-child(3),
  .drive-list-row > span:nth-child(3) { display: none; }

  .upload-zone { padding: 1.2rem; }
  .upload-zone .icon { font-size: 1.5rem; }
  .upload-zone p { font-size: 0.82rem; }

  /* Modal mobile */
  .modal-overlay { padding: 1rem; }
  .modal {
    border-radius: var(--radius);
    padding: 1.3rem;
  }
  .modal h3 { font-size: 1.05rem; margin-bottom: 1rem; }
  .modal-actions { gap: 0.5rem; }
  .modal-actions button { flex: 1; padding: 0.75rem; }
}

/* ── Small Mobile (≤ 400px) ────────────── */

@media (max-width: 400px) {
  .topbar, main, .footer, .auth-page, .drive-page {
    width: calc(100% - 0.75rem);
  }

  h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }

  .portfolio-grid { grid-template-columns: 1fr; }

  .drive-grid { grid-template-columns: repeat(3, 1fr); }

  .brand-sub { display: none; }

  .dashboard-kpis { grid-template-columns: 1fr; }
}

/* ── View toggle ───────────────────────── */

.view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.view-toggle button {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: transparent;
}

.view-toggle button:hover { transform: none; background: var(--surface); }
.view-toggle button.active { color: var(--text); background: var(--surface-strong); }

/* ── Animations ────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.15s; }
.fade-up:nth-child(4) { animation-delay: 0.2s; }
.fade-up:nth-child(5) { animation-delay: 0.25s; }
.fade-up:nth-child(6) { animation-delay: 0.3s; }

/* ── Context menu ──────────────────────── */

.context-menu {
  position: fixed;
  min-width: 160px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  padding: 0.4rem;
  z-index: 500;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: none;
}

.context-menu.open { display: block; }

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.context-menu-item:hover { background: var(--surface-hover); }
.context-menu-item.danger { color: var(--danger); }
.context-menu-item.danger:hover { background: rgba(255, 92, 92, 0.1); }
.context-menu-divider { height: 1px; background: var(--line); margin: 0.3rem 0; }
