/* ==========================================================================
   Galang Saktiawan - Refined Editorial Portfolio Stylesheet
   Palette: Dark Graphite (#1e2022 / #2a2d30), Cream Off-White (#F6F3EE), Icy Cyan (#4cb7e2)
   ========================================================================== */

:root {
  --bg: #1a1c1e;
  --bg-subtle: #212427;
  --panel: #26292d;
  --panel-hover: #2d3136;
  --fg: #F6F3EE;
  --muted: rgba(246, 243, 238, 0.65);
  --dim: rgba(246, 243, 238, 0.38);
  --line: rgba(246, 243, 238, 0.12);
  --line-strong: rgba(246, 243, 238, 0.22);
  
  --accent: #4cb7e2;
  --accent-glow: rgba(76, 183, 226, 0.25);
  --accent-dim: rgba(76, 183, 226, 0.14);
  --accent-dark: #2b7a99;
  
  --emerald: #34d399;
  --emerald-dim: rgba(52, 211, 153, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(76, 183, 226, 0.25);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 10% 20%, rgba(76, 183, 226, 0.07) 0px, transparent 50%),
    radial-gradient(at 90% 40%, rgba(52, 211, 153, 0.05) 0px, transparent 45%),
    radial-gradient(at 50% 90%, rgba(76, 183, 226, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: 'Sora', sans-serif;
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity .2s, color .2s;
}
a:hover {
  opacity: 0.85;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Scroll progress ---- */
.scroll-progress {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #62c3ea, var(--emerald));
  z-index: 1000;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(76, 183, 226, 0.6);
}

/* ---- Navigation Bar ---- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 56px;
  transition: padding .35s ease, background .35s ease, backdrop-filter .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  padding: 14px 56px;
  background: rgba(26, 28, 30, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logo .dot {
  color: var(--accent);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); filter: drop-shadow(0 0 4px var(--accent)); }
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.75;
  padding-bottom: 4px;
  transition: opacity .25s, color .25s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-weight: 600;
}

.nav-status .pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--emerald);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  cursor: pointer;
  padding: 9px;
  border-radius: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 700;
}

.menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--fg);
  display: block;
  transition: transform .25s ease, opacity .25s ease;
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile drawer overlay */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(26, 28, 30, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  transition: color .2s;
}

.mobile-drawer a:hover,
.mobile-drawer a.active {
  color: var(--accent);
}

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s cubic-bezier(.2, .7, .2, 1), transform .65s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Dynamic list item animation (never disappears on filter click) */
.animate-item-fade {
  animation: itemFadeIn .3s ease-out forwards;
}

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

/* ---- Section Container ---- */
section {
  padding: 100px 56px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-head-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-subtag {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.section-head h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  font-size: clamp(30px, 3.6vw, 44px);
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.section-head .index {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-size: 13px;
}

/* ---- HERO SECTION ---- */
.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  padding: 0 56px 40px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg);
  overflow: hidden;
}

.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.28;
  filter: saturate(1.1) contrast(1.05);
  animation: kenburns 22s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 28, 30, 0.55) 0%, rgba(26, 28, 30, 0.88) 75%, var(--bg) 100%);
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

.hero .content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.text-col {
  flex: 1 1 540px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  animation: rise .8s cubic-bezier(.2, .7, .2, 1) .15s forwards;
}

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

.hero-pill-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(76, 183, 226, 0.08);
  border: 1px solid rgba(76, 183, 226, 0.22);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  color: #d1ecf7;
  width: fit-content;
}

.hero-pill-status .indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  line-height: 1.05;
  font-size: clamp(40px, 5.8vw, 82px);
  letter-spacing: -0.03em;
  color: var(--fg);
}

h1 .highlight {
  color: var(--accent);
  font-weight: 700;
  background: linear-gradient(135deg, #4cb7e2 0%, #7cd1f3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.65;
}

.credit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.credit .rule {
  width: 24px;
  height: 1.5px;
  background: var(--accent);
  display: inline-block;
  border-radius: 2px;
}

.credit strong {
  color: var(--fg);
}

/* Interactive Quick Tech Pills in Hero */
.hero-tech-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.hero-tech-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 700;
  margin-right: 4px;
}

.hero-tech-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-tech-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.cta-row {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.cta {
  border: 1px solid var(--line-strong);
  padding: 13px 26px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .25s ease;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
}

.cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.cta.primary {
  background: var(--accent);
  color: #0b1d24;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(76, 183, 226, 0.3);
}

.cta.primary:hover {
  background: #62c3ea;
  border-color: #62c3ea;
  color: #08171d;
  box-shadow: 0 6px 25px rgba(76, 183, 226, 0.45);
}

/* Hero Visual Persona Card (High visual richness!) */
.visual-col {
  flex: 0 1 420px;
  min-width: 320px;
  position: relative;
  animation: rise .8s cubic-bezier(.2, .7, .2, 1) .3s forwards;
}

.persona-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card), 0 0 35px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease;
}

.persona-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 183, 226, 0.35);
}

.persona-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: flex;
  gap: 6px;
}

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

.window-dots span:nth-child(1) { background: #ff5f56; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #27c93f; }

.persona-status-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.persona-avatar-wrap {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1d2124 0%, #292d32 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

.persona-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.persona-card:hover .persona-avatar-img {
  transform: scale(1.03);
}

.persona-fallback-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px;
}

.persona-monogram {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #2b7a99 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 20px rgba(76, 183, 226, 0.4);
}

.persona-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.persona-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.persona-info-footer {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.persona-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
}

.mini-badge.highlight {
  color: var(--accent);
  border-color: rgba(76, 183, 226, 0.3);
  background: var(--accent-dim);
}

/* Floating pill on visual col */
.floating-tag-badge {
  position: absolute;
  bottom: -12px;
  right: -12px;
  background: var(--bg);
  border: 1px solid var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  box-shadow: var(--shadow-card);
  animation: float 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 6px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- ABOUT SECTION ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}

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

.about-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.principle-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: all .25s ease;
}

.principle-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.principle-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.principle-title span {
  color: var(--accent);
}

.principle-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.fact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: all .25s ease;
}

.fact:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  background: var(--panel-hover);
}

.fact b {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
}

.fact-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}

.fact-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---- INTERACTIVE FILTER BAR ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn .count-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--dim);
}

.filter-btn:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.filter-btn.active .count-badge {
  background: rgba(76, 183, 226, 0.25);
  color: var(--accent);
}

/* ---- SKILLS SECTION ---- */
.skills-grid-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 13.5px;
  color: var(--fg);
  background: var(--panel);
  cursor: pointer;
  font-family: inherit;
  transition: all .22s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--panel-hover);
  transform: translateY(-2px);
}

.skill-tag.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(76, 183, 226, 0.2);
}

.skill-icon-glyph {
  font-size: 14px;
}

/* Skill Inspector Terminal/Card */
.skill-inspector {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
  animation: itemFadeIn .25s ease-out;
}

.skill-inspector-left {
  flex: 1 1 320px;
}

.inspector-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.inspector-header b {
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
}

.inspector-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(76, 183, 226, 0.25);
}

.skill-inspector-left p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.skill-inspector-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
  background: rgba(0, 0, 0, 0.2);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.inspector-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  font-weight: 700;
}

.inspector-meta-val {
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}

/* ---- PROJECTS SECTION (VISUALLY RICH & TACTILE) ---- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .25s ease-out;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  background: radial-gradient(280px circle at var(--spot-x, 50%) var(--spot-y, 50%), var(--accent-dim), transparent 70%);
}

.project-card:hover {
  border-color: rgba(76, 183, 226, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(76, 183, 226, 0.15);
}

.project-card:hover::before {
  opacity: 1;
}

/* Stylized Visual Mockup Banner on top of each project */
.project-mockup-frame {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1b1e22 0%, #23272c 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
}

.project-card:hover .project-mockup-frame {
  border-color: var(--line-strong);
}

.mockup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
}

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

.mockup-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-pill-title {
  font-size: 10px;
  font-family: monospace;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

.mockup-stage {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Mockup Variations */
/* 1. Mobile Booking Visual */
.mockup-booking-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.mockup-mini-phone {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.phone-line {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
}
.phone-line.active {
  background: var(--accent);
  width: 70%;
}
.booking-pill {
  font-size: 10px;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
}

/* 2. Medical Diagnosis Radar */
.mockup-diag-ui {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.diag-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.diag-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.diag-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  border-radius: 3px;
}

/* 3. Java MVC Database Node */
.mockup-java-ui {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  gap: 8px;
}
.java-node {
  background: rgba(76, 183, 226, 0.08);
  border: 1px solid rgba(76, 183, 226, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}
.java-arrow {
  color: var(--dim);
  font-size: 12px;
}

/* 4. Monitoring Lab Grid */
.mockup-grid-ui {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}
.pc-node {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pc-node .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}
.pc-node.warn .led {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

/* Project Card Content */
.project-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.project-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.project-card .tag {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-card .featured-badge {
  font-size: 10.5px;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.project-card h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0;
  color: var(--fg);
  line-height: 1.3;
}

.project-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}

.tool-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.project-card .link {
  font-size: 13px;
  font-weight: 700;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .25s ease;
}

.project-card:hover .link {
  transform: translateX(5px);
}

/* ---- PROJECT MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px;
  animation: modalFadeIn .2s ease-out;
}

.modal {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  padding: 36px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(76, 183, 226, 0.2);
  animation: modalSlideIn .28s cubic-bezier(.2, .7, .2, 1);
}

.modal .tag {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin: 10px 0 14px;
  color: var(--fg);
  line-height: 1.25;
}

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.modal-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.modal-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  margin-bottom: -1px;
}

.modal-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.modal-detail {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 20px;
}

.modal-results {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-results li {
  font-size: 13.5px;
  color: var(--fg);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---- BACK TO TOP BUTTON ---- */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 600;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(33, 36, 39, 0.9);
  backdrop-filter: blur(8px);
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all .25s ease;
  box-shadow: var(--shadow-card);
}

.back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---- CONTACT SECTION ---- */
.contact-card-box {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.contact-card-box::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.contact-card-box h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  font-size: clamp(30px, 4.5vw, 50px);
  max-width: 18ch;
  margin: 0 0 16px;
  line-height: 1.15;
  color: var(--fg);
}

.contact-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.copy-email-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius-full);
}

.copy-email-text {
  font-family: monospace;
  font-size: 13.5px;
  color: var(--fg);
  user-select: all;
}

.copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  border: none;
  color: #0b1d24;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}

.copy-email-btn:hover {
  background: #62c3ea;
  transform: scale(1.02);
}

.copy-email-btn.copied {
  background: var(--emerald);
  color: #062b1b;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.contact-links a {
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color .2s, transform .2s, color .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--fg);
}

.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---- FOOTER ---- */
footer {
  padding: 32px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero .content {
    flex-direction: column;
    text-align: left;
    gap: 40px;
  }
  .visual-col {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .facts {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 24px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fact {
    flex: 1 1 200px;
  }
}

@media (max-width: 680px) {
  .nav, .hero, section, footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .nav-links, .nav-status {
    display: none;
  }
  .menu-btn {
    display: flex;
  }
  .hero {
    padding-top: 20px;
  }
  .about-principles {
    grid-template-columns: 1fr;
  }
  .projects {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 24px;
  }
  .copy-email-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: var(--radius-md);
  }
  .copy-email-btn {
    justify-content: center;
  }
  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
