@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap');

:root {
  --bg: #020608;
  --bg2: #050e12;
  --bg3: #0a1a20;
  --panel: #0d2028;
  --panel2: #112530;
  --border: #1a4a5a;
  --border-hot: #00d4ff;
  --cyan: #00d4ff;
  --cyan-dim: #007a99;
  --amber: #ffaa00;
  --amber-dim: #7a5000;
  --red: #ff3355;
  --red-dim: #7a1a2a;
  --green: #00ff88;
  --green-dim: #006633;
  --purple: #b060ff;
  --purple-dim: #5a2a99;
  --orange: #ff6a20;
  --orange-dim: #7a3000;
  --text: #c8e8f0;
  --text-dim: #4a7a8a;
  --text-bright: #eaf8ff;
  --mono: 'Share Tech Mono', monospace;
  --display: 'Orbitron', sans-serif;
  --body: 'Exo 2', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: crosshair;
}

/* SCANLINE OVERLAY */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,212,255,0.015) 2px,
    rgba(0,212,255,0.015) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* NOISE TEXTURE */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.4;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(2,6,8,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 4px;
  text-shadow: 0 0 20px var(--cyan), 0 0 40px rgba(0,212,255,0.3);
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--amber);
  text-shadow: 0 0 20px var(--amber);
}

.nav-subtitle {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent;
  letter-spacing: 1px;
  transition: all 0.2s;
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--cyan);
  border-color: var(--border);
  background: var(--bg3);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* PAGE WRAPPER */
.page {
  padding-top: 60px;
  min-height: 100vh;
}

/* ===== HOME PAGE ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  overflow: hidden;
}

/* Grid background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 4px;
  border: 1px solid var(--amber-dim);
  padding: 0.3rem 1rem;
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.6s ease both;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(5rem, 18vw, 12rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 10px;
  color: var(--cyan);
  text-shadow:
    0 0 30px rgba(0,212,255,0.5),
    0 0 80px rgba(0,212,255,0.2),
    0 0 120px rgba(0,212,255,0.1);
  animation: fadeSlideDown 0.6s 0.1s ease both;
  position: relative;
}

.hero-title::after {
  content: 'SUS';
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,212,255,0.15);
  transform: translate(3px, 3px);
}

.hero-fullname {
  font-family: var(--display);
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  letter-spacing: 8px;
  color: var(--text-dim);
  margin-top: 0.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  animation: fadeSlideDown 0.6s 0.2s ease both;
}

.hero-fullname em {
  color: var(--cyan);
  font-style: normal;
}

.hero-desc {
  max-width: 520px;
  color: var(--text-dim);
  font-weight: 300;
  font-size: 1rem;
  margin-bottom: 4rem;
  animation: fadeSlideDown 0.6s 0.3s ease both;
  line-height: 1.8;
}

/* Tool cards grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 1080px;
  width: 100%;
  border: 1px solid var(--border);
  animation: fadeSlideDown 0.6s 0.4s ease both;
}

.tool-card {
  background: var(--panel);
  padding: 2rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  border: 1px solid transparent;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--card-color, var(--cyan));
  transition: height 0.3s;
  box-shadow: 0 0 12px var(--card-color, var(--cyan));
}

.tool-card:hover {
  background: var(--panel2);
  border-color: var(--border);
}

.tool-card:hover::before { height: 100%; }

.tool-card:hover .card-icon { transform: scale(1.1); }

.card-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.card-icon {
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s;
  display: block;
  color: var(--card-color, var(--cyan));
  flex-shrink: 0;
}

.tool-header-icon {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--icon-color, var(--cyan));
  filter: drop-shadow(0 0 8px currentColor);
}

.nav-icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  color: currentColor;
}

.nav-links a:hover .nav-icon,
.nav-links a.active .nav-icon {
  opacity: 1;
}

.card-title {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.card-tag {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--card-color, var(--cyan));
  letter-spacing: 2px;
  opacity: 0.7;
}

.card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 1rem;
  color: var(--card-color, var(--cyan));
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all 0.2s;
}

.tool-card:hover .card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* STATUS BAR */
.status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: rgba(2,6,8,0.95);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 2rem;
  z-index: 1000;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  margin-right: 0.4rem;
  animation: pulse 2s infinite;
}

.status-bar .right { margin-left: auto; }

/* ===== TOOL PAGES ===== */
.tool-page {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.tool-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.tool-header-text {}

.tool-header-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-bottom: 0.25rem;
}

.tool-header h1 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-bright);
  text-shadow: 0 0 20px rgba(0,212,255,0.2);
  margin-bottom: 0.4rem;
}

.tool-header p {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 300;
}

/* PANELS */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.panel-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* INPUTS */
input[type="text"],
input[type="password"],
input[type="url"],
textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

input:focus, textarea:focus {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 2px rgba(0,212,255,0.08), inset 0 0 20px rgba(0,212,255,0.03);
}

input::placeholder, textarea::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

/* BUTTONS */
.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 2px;
  padding: 0.7rem 1.8rem;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  background: transparent;
}

.btn-primary {
  color: var(--cyan);
  border-color: var(--cyan-dim);
  box-shadow: inset 0 0 0 0 var(--cyan);
}

.btn-primary:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0,212,255,0.4);
}

.btn-danger {
  color: var(--red);
  border-color: var(--red-dim);
}

.btn-danger:hover {
  background: var(--red);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(255,51,85,0.4);
}

.btn-amber {
  color: var(--amber);
  border-color: var(--amber-dim);
}

.btn-amber:hover {
  background: var(--amber);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(255,170,0,0.4);
}

/* RESULTS */
.result-block {
  margin-top: 1.5rem;
  animation: fadeSlideDown 0.3s ease;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(26,74,90,0.4);
  gap: 1rem;
}

.result-row:last-child { border-bottom: none; }

.result-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.result-val {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-bright);
  text-align: right;
  word-break: break-all;
}

/* SCORE / BADGE */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 0.2rem 0.7rem;
  border: 1px solid;
}

.badge-green  { color: var(--green);  border-color: var(--green-dim);  background: rgba(0,255,136,0.05); }
.badge-amber  { color: var(--amber);  border-color: var(--amber-dim);  background: rgba(255,170,0,0.05); }
.badge-red    { color: var(--red);    border-color: var(--red-dim);    background: rgba(255,51,85,0.05); }
.badge-cyan   { color: var(--cyan);   border-color: var(--cyan-dim);   background: rgba(0,212,255,0.05); }
.badge-purple { color: var(--purple); border-color: var(--purple-dim); background: rgba(176,96,255,0.05); }
.badge-orange { color: var(--orange); border-color: var(--orange-dim); background: rgba(255,106,32,0.05); }

/* STRENGTH METER */
.strength-meter {
  height: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1), background 0.5s;
  box-shadow: 0 0 10px currentColor;
}

.strength-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  letter-spacing: 1px;
}

/* ENTROPY RING */
.score-display {
  text-align: center;
  padding: 2rem 0;
}

.score-number {
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  transition: color 0.5s;
}

.score-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-top: 0.5rem;
}

/* GRID RESULTS */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1rem;
}

.result-cell {
  background: var(--panel);
  padding: 1rem;
}

.result-cell-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}

.result-cell-val {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-bright);
}

/* RISK BARS */
.risk-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.risk-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  width: 180px;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.risk-bar {
  flex: 1;
  height: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden;
}

.risk-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px currentColor;
}

.risk-pct {
  font-family: var(--mono);
  font-size: 0.72rem;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* TAGS */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.tag.warn  { border-color: var(--amber-dim); color: var(--amber); }
.tag.safe  { border-color: var(--green-dim); color: var(--green); }
.tag.danger { border-color: var(--red-dim); color: var(--red); }

/* FILE DROP ZONE */
.drop-zone {
  border: 2px dashed var(--border);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--cyan-dim);
  background: rgba(0,212,255,0.03);
}

.drop-zone-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.drop-zone p {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* HEADER GRADE TABLE */
.header-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.header-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--border);
  font-size: 0.65rem;
}

.header-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(26,74,90,0.3);
  vertical-align: top;
  line-height: 1.5;
}

.header-table tr:last-child td { border-bottom: none; }

.header-table td:first-child { color: var(--cyan); }
.header-table td:nth-child(2) { color: var(--text-dim); word-break: break-all; max-width: 250px; }

.grade-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 2px solid;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.75rem;
}

/* OVERALL SCORE */
.big-grade {
  font-family: var(--display);
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  padding: 1.5rem 0;
}

/* SECTION */
section.tool-section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* MAP / EXIF display */
.exif-map-placeholder {
  background: var(--bg2);
  border: 1px solid var(--border);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

.map-crosshair {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* LOADER */
.loader {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* COPY BUTTON */
.copy-btn {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.copy-btn:hover { color: var(--cyan); border-color: var(--cyan-dim); }

/* TOOLTIP */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tip {
  visibility: hidden;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.4rem 0.7rem;
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 100;
  letter-spacing: 1px;
}
.tooltip:hover .tip { visibility: visible; }

/* ANIMATIONS */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes glitch {
  0%  { clip-path: inset(0 0 98% 0); transform: translate(-4px); }
  10% { clip-path: inset(50% 0 40% 0); transform: translate(4px); }
  20% { clip-path: inset(20% 0 70% 0); transform: translate(0); }
  30% { clip-path: inset(80% 0 10% 0); transform: translate(-2px); }
  100%{ clip-path: inset(0 0 98% 0); transform: translate(0); }
}

.glitch-text {
  position: relative;
}
.glitch-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--red);
  animation: glitch 3s 2s infinite;
  clip-path: inset(0 0 100% 0);
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* BACK TO PORTFOLIO LINK */
.nav-back {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-back:hover {
  color: var(--cyan);
  border-color: var(--cyan-dim);
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .tools-grid { grid-template-columns: 1fr; }
  .nav-subtitle { display: none; }
  .nav-links a { font-size: 0.65rem; padding: 0.3rem 0.5rem; }
  .hero-title { font-size: 5rem; }
}
@media (max-width: 900px) and (min-width: 641px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MOBILE STYLES ===================================================== */
@media (max-width: 768px) {

  /* NAV: stack into a compact top bar */
  nav {
    height: auto;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    gap: 0.5rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
  }

  .nav-logo { font-size: 1.1rem; letter-spacing: 2px; }
  .nav-subtitle { display: none; }
  .nav-back { font-size: 0.58rem; padding: 0.2rem 0.5rem; margin-left: auto; }

  /* Nav links become a horizontal scrollable strip on second row */
  .nav-links {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.1rem;
  }

  .nav-links::-webkit-scrollbar { display: none; }

  .nav-links li { flex-shrink: 0; }

  .nav-links a {
    font-size: 0.6rem;
    padding: 0.35rem 0.6rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
  }

  .nav-icon { width: 0.85rem; height: 0.85rem; }

  /* Push page content below taller nav */
  .page { padding-top: 90px; }

  /* HERO */
  .hero {
    padding: 2rem 1rem 3rem;
    min-height: auto;
  }

  .hero-title { font-size: clamp(3.5rem, 20vw, 5.5rem); letter-spacing: 4px; }
  .hero-fullname { font-size: 0.65rem; letter-spacing: 3px; }
  .hero-desc { font-size: 0.88rem; margin-bottom: 2rem; }
  .hero-badge { font-size: 0.6rem; }

  .tools-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .tool-card { padding: 1.25rem; }
  .card-icon { width: 2rem; height: 2rem; }
  .card-title { font-size: 0.78rem; }
  .card-desc { font-size: 0.78rem; }

  /* TOOL PAGES */
  .tool-page {
    padding: 1rem 1rem 4rem;
  }

  .tool-header {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .tool-header-icon { width: 2.2rem; height: 2.2rem; }
  .tool-header h1 { font-size: 1.2rem; letter-spacing: 2px; }
  .tool-header p { font-size: 0.8rem; }

  /* Panels */
  .panel { padding: 1rem; }

  /* Result grids collapse to 2 cols */
  .result-grid { grid-template-columns: repeat(2, 1fr); }

  /* Two-column layouts become single column */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }

  div[style*="grid-template-columns:auto 1fr"],
  div[style*="grid-template-columns: auto 1fr"] {
    display: block !important;
  }

  /* Score displays inside collapsed grids */
  .big-grade { font-size: 3.5rem; padding: 1rem 0 0.5rem; }
  .score-number { font-size: 3rem; }

  /* Risk items */
  .risk-name { width: 120px; font-size: 0.65rem; }

  /* Header table: hide desc column on small screens */
  .header-table td:nth-child(2) { max-width: 140px; font-size: 0.68rem; }
  .header-table th:nth-child(3),
  .header-table td:nth-child(3) { display: none; }

  /* Buttons */
  .btn { font-size: 0.7rem; padding: 0.6rem 1.2rem; }

  /* Input rows that have flex gap */
  div[style*="display:flex;gap:0.5rem"],
  div[style*="display: flex; gap: 0.5rem"] {
    flex-wrap: wrap;
  }

  /* Drop zone */
  .drop-zone { padding: 2rem 1rem; }

  /* Status bar: compact */
  .status-bar {
    font-size: 0.55rem;
    padding: 0 0.75rem;
    height: 24px;
    gap: 0.75rem;
    letter-spacing: 0;
  }

  .status-bar span:nth-child(2) { display: none; }

  /* Decode page two-col layout */
  #decode-page-grid {
    display: block !important;
  }

  /* Encoding tabs wrap tightly */
  .encoding-tabs { gap: 0.25rem; }
  .encode-btn { font-size: 0.6rem; padding: 0.2rem 0.45rem; }

  /* Hash comparison grid */
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Exif map placeholder shorter */
  .exif-map-placeholder { height: 140px; }

  /* Section titles */
  .section-title { font-size: 0.6rem; }

  /* Result rows: allow val to wrap */
  .result-row { flex-wrap: wrap; gap: 0.25rem; }
  .result-val { text-align: left; font-size: 0.75rem; }
  .result-key { font-size: 0.65rem; }

  /* Strength labels smaller */
  .strength-labels { font-size: 0.52rem; }

  /* Card arrow hidden on mobile (redundant) */
  .card-arrow { display: none; }

  /* Hero glow smaller */
  .hero-glow { width: 300px; height: 300px; }
}
