/* ============================================================
   CSS VARIABLES & RESET
   ============================================================ */
:root {
  --bg: #08101e;
  --bg-2: #0d1828;
  --blue: #1a8cff;
  --green: #6ec94f;
  --brown: #a67c52;
  /* New branding color */
  --blue-dim: rgba(26, 140, 255, 0.15);
  --green-dim: rgba(110, 201, 79, 0.15);
  --text: #e8edf5;
  --text-muted: #7a8fa8;
  --white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --font-display: 'DM Serif Display', serif;
  --font-sans: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  /* cursor: none; */
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
/*
#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s var(--ease-out), height 0.3s var(--ease-out), background 0.3s;
  mix-blend-mode: screen;
}

#cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(26, 140, 255, 0.5);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out), width 0.4s var(--ease-out), height 0.4s var(--ease-out), border-color 0.3s;
}

body.cursor-hover #cursor {
  width: 20px;
  height: 20px;
  background: var(--green);
}

body.cursor-hover #cursor-ring {
  width: 54px;
  height: 54px;
  border-color: rgba(110, 201, 79, 0.4);
}
*/

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s, padding 0.4s;
}

nav.scrolled {
  background: rgba(8, 16, 30, 0.85);
  backdrop-filter: blur(20px);
  padding: 14px 48px;
  border-bottom: 1px solid var(--card-border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--blue);
}

/* Nav Toggle Button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  transition: 0.3s var(--ease-out);
  border-radius: 2px;
}

.nav-toggle span:nth-child(1) {
  background: var(--blue);
}

.nav-toggle span:nth-child(2) {
  background: var(--green);
}

.nav-toggle span:nth-child(3) {
  background: var(--brown);
}

.nav-toggle.active span {
  background: var(--white);
  /* Switch to white when menu is open for contrast */
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 30, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1050;
  /* Above regular content but below navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
}

.mobile-nav-links li {
  margin: 32px 0;
}

.mobile-nav-links a {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.mobile-nav-links a:hover {
  color: var(--blue);
}

body.menu-open {
  overflow: hidden;
}

/* ============================================================
   HERO SECTION — THE GLASS CARD
   ============================================================ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wires-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  inset: 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: 1;
  opacity: 0.6;
}

.glass-card {
  position: relative;
  z-index: 2;
  background: white;
  border-radius: 4px;
  padding: 25px 28px 24px;
  width: 540px;
  max-width: 92vw;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 1px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-card:hover {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.4),
    0 0 160px rgba(26, 140, 255, 0.4),
    0 0 240px rgba(110, 201, 79, 0.25);
}

.card-header {
  text-align: right;
  margin-bottom: 28px;
}

.card-name {
  font-family: Cambria, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: #111;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.card-contact {
  font-family: Cambria, serif;
  font-size: 1rem;
  color: black;
  line-height: 2;
  letter-spacing: 0.02em;
}

.card-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
}

.card-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ccc, transparent);
}

.card-mini-logo {
  position: absolute;
  width: 300px;
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.card-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-links a {
  font-family: Cambria, serif;
  font-size: 0.9rem;
  color: #1a8cff;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.card-links a:hover {
  color: #6ec94f;
}

.card-tagline {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0f4ff;
  color: #1a8cff;
  border: 1px solid rgba(26, 140, 255, 0.2);
}

.tag-pill.green {
  background: #f0fff4;
  color: #3a9a1e;
  border-color: rgba(110, 201, 79, 0.3);
}

.tag-pill.brown {
  background: rgba(166, 124, 82, 0.1);
  color: var(--brown);
  border-color: rgba(166, 124, 82, 0.3);
}

@media (max-width: 768px) {
  .glass-card {
    padding: 20px;
    width: 100%;
  }
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}

.scroll-hint span,
.scroll-hint-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.scroll-hint-link:hover {
  color: var(--blue);
}

.scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

/* ============================================================
   SECTION BASE STYLES
   ============================================================ */
section {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
  z-index: 1;
  /* Create a stacking context for wires-canvas: -1 */
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 10;
  /* Safe content layer */
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--blue);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
}

.accent-blue,
.section-title em {
  font-style: italic;
  color: var(--blue);
}

.accent-green,
.section-title .accent-green {
  color: var(--green);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Transitions disabled to avoid initial flash, keeping class for future if needed */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT — HYBRID MINDSET (BENTO GRID)
   ============================================================ */
#about {
  background: var(--bg);
}

.about-intro {
  max-width: 640px;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 64px;
}

.about-intro strong {
  color: var(--text);
  font-weight: 600;
}

/* New About Layout with Image */
.about-top-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  margin-bottom: 64px;
}

.about-text-content {
  flex: 1;
  max-width: 640px;
}

.about-intro.emphasized {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.6;
  margin-bottom: 32px;
}

.about-image-side {
  flex-shrink: 0;
  width: 320px;
  position: relative;
  z-index: 10;
}

.about-image-side img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0px 100px rgba(255, 255, 255, 0.4);
  transition: transform 0.4s var(--ease-out);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}

.bento-card {
  background: #0c1626;
  /* Solid to block wires */
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  z-index: 5;
  /* Above wires */
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.bento-card:hover {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  border-color: rgba(26, 140, 255, 0.3);
}

.bento-card.card-main {
  grid-column: span 7;
  grid-row: span 2;
}

.bento-card.card-lang {
  grid-column: span 5;
}

.bento-card.card-tech {
  grid-column: span 5;
}

.bento-card.card-stat1 {
  grid-column: span 3;
}

.bento-card.card-stat2 {
  grid-column: span 3;
}

.bento-card.card-stat3 {
  grid-column: span 3;
}

.bento-card.card-stat4 {
  grid-column: span 3;
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 20px;
  display: block;
}

.bento-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.bento-card h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}

.bento-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.mini-chart {
  margin-top: 28px;
  height: 80px;
  position: relative;
}

.mini-chart svg {
  width: 100%;
  height: 100%;
}

.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.lang-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(110, 201, 79, 0.1);
  border: 1px solid rgba(110, 201, 79, 0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--green);
  font-weight: 500;
}

.lang-pill .flag {
  font-size: 1rem;
}

.code-block {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: #8fb7e0;
  overflow: hidden;
}

.code-block .kw {
  color: var(--blue);
}

.code-block .str {
  color: var(--green);
}

.code-block .fn {
  color: #c9a7ff;
}

.code-block .cm {
  color: var(--text-muted);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-number span {
  color: var(--blue);
}

.stat-number.green span {
  color: var(--green);
}

.stat-number.brown span {
  color: var(--brown);
}

.stat-desc {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ============================================================
   PROJECTS — COLLAPSIBLE / ACCORDION
   ============================================================ */
#projects {
  background: var(--bg-2);
}

.projects-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 32px;
}

.projects-intro p {
  max-width: 480px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.controls {
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  background: var(--card-bg);
  color: var(--text-muted);
}

.btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-dim);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-item {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  background: #0c1626;
  /* More opaque background to block wires */
  border: 1px solid var(--card-border);
  position: relative;
  z-index: 5;
  transition: border-color 0.3s;
}

.project-item:hover {
  border-color: rgba(26, 140, 255, 0.25);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.project-header:hover {
  background: rgba(255, 255, 255, 0.025);
}

.project-header-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  flex-shrink: 0;
  width: 28px;
}

.project-header-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Base colored style for header icons */
.project-header-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--blue);
  /* Default blue */
  transition: transform 0.3s var(--ease-out), stroke 0.3s, filter 0.3s;
}

/* Green accent for active projects */
.project-item:nth-child(1) .project-header-icon svg,
.project-item:nth-child(2) .project-header-icon svg,
.project-item:nth-child(3) .project-header-icon svg {
  stroke: var(--green);
}

/* Hover/Open glow & color shift */
.project-item:hover .project-header-icon svg,
.project-item.open .project-header-icon svg {
  stroke: var(--white);
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.project-item.archived .project-header-icon {
  opacity: 0.7;
}

.project-item.archived .project-header-icon svg {
  stroke: var(--text-muted);
}

/* Bento card icons */
.card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.icon-blue {
  stroke: var(--blue);
}

.icon-green {
  stroke: var(--green);
}

.icon-mixed {
  stroke: var(--blue);
}

/* handled via dual colors in SVG if needed */
.project-tags {
  display: flex;
  gap: 10px;
  align-items: center;
}

.project-header-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
  flex: 1;
  line-height: 1.2;
  font-weight: normal;
}

.project-header-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.tag-green {
  background: rgba(110, 201, 79, 0.12);
  color: var(--green);
  border: 1px solid rgba(110, 201, 79, 0.25);
}

.tag-blue {
  background: rgba(26, 140, 255, 0.12);
  color: var(--blue);
  border: 1px solid rgba(26, 140, 255, 0.25);
}

.tag-muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.project-toggle {
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-out), color 0.2s;
}

.project-item.open .project-toggle {
  transform: rotate(180deg);
  color: var(--blue);
}

.project-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s var(--ease-out);
}

.project-item.open .project-body {
  grid-template-rows: 1fr;
}

.project-body-inner {
  overflow: hidden;
}

.project-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  padding: 0 32px 32px;
  align-items: start;
}

.project-text p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.project-text a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 140, 255, 0.3);
  transition: border-color 0.2s, color 0.2s;
}

.project-text a:hover {
  color: var(--green);
  border-color: var(--green);
}

.project-visual-wrap {
  position: sticky;
  top: 100px;
}

.project-img-box {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(26, 140, 255, 0.05), rgba(110, 201, 79, 0.03));
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: filter 0.6s var(--ease-out);
  cursor: zoom-in;
}

.project-img-box {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(26, 140, 255, 0.05), rgba(110, 201, 79, 0.03));
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.4s, box-shadow 0.4s;
}

/* Glow effect specifically when hovering OVER the image */
.project-img-box:hover {
  border-color: var(--blue);
  box-shadow: 0 0 60px rgba(26, 140, 255, 0.5);
  outline: 1px solid rgba(26, 140, 255, 0.3);
}

.project-img-box:hover img {
  filter: grayscale(0) brightness(1.1) !important;
}

.project-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: default;
  transition: background 0.2s;
}

.mini-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.private-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  margin-top: 12px;
}

/* ============================================================
   EXPERIENCE SECTION
   ============================================================ */
#experience {
  background: var(--bg-2);
  padding: 120px 0;
}

.exp-list {
  margin-top: 50px;
  position: relative;
  padding-left: 20px;
}
.exp-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  opacity: 0.3;
}

.exp-item {
  position: relative;
  margin-bottom: 25px;
  padding-left: 25px;
}

.exp-dot {
  position: absolute;
  left: -4px;
  top: 8px;
  width: 9px;
  height: 9px;
  background: #08101e;
  border: 2.5px solid var(--blue);
  border-radius: 50%;
  z-index: 2;
}



.exp-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}



.exp-content {
  background: #0c1626;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px;
  position: relative;
  z-index: 5;
  transition: border-color 0.3s, transform 0.4s var(--ease-out);
}

.exp-content:hover {
  border-color: rgba(26, 140, 255, 0.2);
}



.exp-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  line-height: 1.2;
  font-weight: normal;
}

.exp-content h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: normal;
}

.exp-header-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .exp-header-info {
    flex-direction: column;
    gap: 4px;
  }
}

.exp-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.exp-group-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}



.exp-content ul {
  list-style: none;
}

.exp-content ul li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}

.exp-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
  opacity: 0.5;
  font-size: 0.85rem;
}



.exp-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.exp-mini {
  display: flex;
  flex-direction: column;
}

.exp-mini-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exp-mini strong {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.exp-mini-comp {
  font-size: 0.85rem;
  color: var(--blue);
  font-family: var(--font-sans);
}

/* Career Story Section */
.career-story {
  margin-top: 80px;
  margin-bottom: 60px;
  padding: 40px 48px;
  background: #0c1626;
  /* Solid background */
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  max-width: 780px;
  position: relative;
  z-index: 5;
}

.story-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
}

.story-text em {
  font-style: normal;
}

/* ============================================================
   EDUCATION SECTION (Akademické kořeny)
   ============================================================ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.edu-card {
  background: #0c1626;
  /* Opaque background to hide wires */
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.4s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}

.edu-card:hover {
  border-color: rgba(166, 124, 82, 0.4);
  box-shadow: 0 8px 24px rgba(166, 124, 82, 0.1);
}

.edu-year {
  font-family: var(--font-mono);
  color: var(--brown);
  font-size: 0.8rem;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.edu-school {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.edu-title {
  color: var(--brown);
  font-weight: 400;
}

.edu-desc {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .exp-list {
    padding-left: 5px;
    margin-top: 32px;
  }

  .exp-content {
    padding: 16px 12px;
  }

  .exp-item {
    padding-left: 18px;
    margin-bottom: 24px;
  }

  .exp-dot {
    left: -4px;
    top: 6px;
  }

  .exp-sub,
  .exp-mini-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .exp-content ul li {
    font-size: 0.82rem;
    padding-left: 15px;
    margin-bottom: 6px;
  }
}

/* Exp Collapsible */
.exp-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}

.exp-details-inner {
  overflow: hidden;
}

.exp-item.open .exp-details {
  grid-template-rows: 1fr;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.exp-header {
  cursor: pointer;
}

.exp-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.exp-toggle {
  font-size: 1.2rem;
  color: var(--blue);
  transition: transform 0.3s;
}

.exp-item.open .exp-toggle {
  transform: rotate(180deg);
}



/* ============================================================
   VALUES SECTION
   ============================================================ */
#values {
  background: var(--bg);
  padding: 100px 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* Larger gap as requested */
  margin-top: 64px;
}

.value-item {
  padding: 40px 36px;
  background: #0c1626;
  /* Solid background to block wires */
  border: 1px solid var(--card-border);
  border-radius: 12px;
  /* Matching other modern blocks */
  position: relative;
  z-index: 5;
  transition: border-color 0.3s, background 0.3s;
}

.value-item:hover {
  background: rgba(26, 140, 255, 0.05);
  /* Slightly lighter but still opaque over the dark bg */
  border-color: rgba(26, 140, 255, 0.2);
}

.value-number {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.value-item h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.2;
}

.value-item h3 em {
  color: var(--blue);
}

.value-item p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact {
  background: var(--bg-2);
  padding: 120px 0 100px;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 0 60px;
  align-items: start;
}

/* Let's make header/subtext span both columns */
.contact-header {
  grid-column: span 2;
  margin-bottom: 48px;
}

@media (max-width: 992px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-header {
    grid-column: span 1;
  }
}

.contact-cta {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 24px;
}

.contact-cta em {
  color: var(--green);
}

.contact-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .contact-links {
    grid-template-columns: 1fr;
  }
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  padding: 18px 24px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #0c1626;
  /* Solid background to block wires behind it */
  position: relative;
  z-index: 5;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}

.contact-link:hover {
  border-color: rgba(26, 140, 255, 0.35);
  background: #111d2e;
  /* Solid background on hover */
}

.contact-link .link-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-link .link-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.contact-link .link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-link .link-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-link .link-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}

.contact-link .link-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform 0.3s, color 0.3s;
}

.contact-link:hover .link-arrow {
  transform: translateX(4px);
  color: var(--blue);
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
  background: #0c1626;
  padding: 32px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  position: relative;
  z-index: 5;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(26, 140, 255, 0.05);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  background: var(--brown);
  color: #ffffff;
  border: none;
  padding: 14px 35px;
  border-radius: 4px;
  /* Jen mírné zakulacení pro moderní vzhled */
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: normal;
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.btn-submit em {
  font-style: italic;
}

.btn-submit:hover {
  filter: brightness(1.1);
  /* Jemné zesvětlení */
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-card {
  background: #0c1626;
  /* Solid background */
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 24px;
  text-decoration: none;
  position: relative;
  z-index: 5;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-card:hover {
  border-color: rgba(110, 201, 79, 0.3);
  transform: translateY(-3px);
}

.social-card .s-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-card .s-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.social-card .s-name {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
}

.social-card .s-desc {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Skills & Certificates */
.skills-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cert-list {
  margin-top: 24px;
}

.cert-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--blue);
  width: 60px;
  flex-shrink: 0;
}

.cert-content h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 4px;
  font-weight: normal;
}

.cert-content p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cert-detail-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 10px;
}

.cert-detail-list li {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
}

.cert-detail-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
  opacity: 0.5;
  font-size: 0.75rem;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cert-tag {
  font-size: 1rem;
  color: var(--green);
  opacity: 0.8;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--card-border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-copy a {
  color: var(--brown);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-copy a:hover {
  color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  nav {
    padding: 16px 24px;
  }

  nav.scrolled {
    padding: 12px 24px;
  }

  .container {
    padding: 0 10px;
  }

  section {
    padding: 80px 0;
  }

  .about-top-flex {
    flex-direction: column;
    gap: 40px;
    align-items: center;
    margin-bottom: 48px;
  }

  .about-text-content {
    text-align: center;
  }

  .about-intro {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .about-image-side {
    width: 180px;
    order: 2;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bento-card.card-main,
  .bento-card.card-lang,
  .bento-card.card-tech,
  .bento-card.card-stat1,
  .bento-card.card-stat2,
  .bento-card.card-stat3,
  .bento-card.card-stat4,
  .bento-card[style*="span"] {
    grid-column: span 1 !important;
  }

  .project-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px 24px;
  }

  .project-visual-wrap {
    display: block;
    /* Show images on mobile as well */
    margin-top: 24px;
  }

  .project-img-box {
    aspect-ratio: 16/9;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .contact-form {
    padding: 24px 16px;
  }

  .skills-bento {
    grid-template-columns: 1fr;
  }

  .skills-bento .bento-card {
    grid-column: span 1 !important;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
    /* Show hamburger on mobile */
  }

  .glass-card {
    padding: 36px 28px;
  }

  .card-mini-logo {
    width: 150px;
  }

  .projects-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-header {
    padding: 10px 8px;
    gap: 8px;
    flex-wrap: wrap;
    display: flex;
    align-items: center;
  }

  .project-content {
    padding: 0 8px 12px;
  }

  .project-header-num,
  .project-header-icon,
  .project-header-title,
  .project-toggle {
    order: 1;
  }

  .project-header-title {
    flex: 1;
    min-width: 0;
  }

  .project-tags {
    flex-basis: 100%;
    order: 2;
    margin-top: 8px;
    gap: 6px;
  }

  .project-toggle {
    margin-left: auto;
  }

  .project-header-tag {
    order: 3;
  }

  .project-toggle {
    order: 2;
    margin-left: auto;
  }

  .project-header-title {
    font-size: 0.95rem;
  }

  .project-header-icon {
    width: 24px;
    height: 24px;
  }

  .project-header-tag {
    font-size: 0.55rem;
    padding: 3px 8px;
  }

  .project-header-num {
    width: 20px;
    font-size: 0.55rem;
  }

  .project-toggle {
    font-size: 0.9rem;
  }

  .scroll-hint {
    bottom: 80px;
    /* Shifting higher on mobile */
  }
}

/* DECORATIVE GLOW BLOBS */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.15;
  z-index: -1;
}

.blob-blue {
  background: var(--blue);
}

.blob-green {
  background: var(--green);
}

/* ARCHIVED PROJECTS */
.project-item.archived {
  opacity: 1;
  /* MUST be opaque to hide background wires */
  background: #0b121c;
  /* Solid, slightly darker background */
  filter: grayscale(1);
  /* Still look archived */
  transition: filter 0.3s, border-color 0.3s;
}

.project-item.archived:hover {
  filter: grayscale(0.2);
  border-color: rgba(26, 140, 255, 0.15);
}

.project-item.archived .project-header,
.project-item.archived .project-body {
  opacity: 0.6;
  /* Fade the CONTENT instead of the overall container */
  transition: opacity 0.3s;
}

.project-item.archived:hover .project-header,
.project-item.archived:hover .project-body {
  opacity: 1;
}

.project-item.archived .project-header-title {
  color: var(--text-muted);
}

.project-item.archived .tag-green,
.project-item.archived .tag-blue {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: var(--card-border);
}

/* ============================================================
   LIGHTBOX OVERLAY
   ============================================================ */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 9, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

#lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

#lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -20px;
  font-size: 2.5rem;
  color: var(--white);
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
  color: var(--blue);
}