/* ============================================
         SQUARESPACE-INSPIRED PORTFOLIO
============================================ */
:root {
  /* Surface palette — warm Squarespace neutrals */
  --bg-color: #FFFFFF;
  --bg-alt: #F7F6F3;
  --bg-terminal: #F7F6F3;
  --bg-code: #1a1a2e;
  --bg-glass: #FFFFFF;
  --bg-glass-hover: #FAFAF8;

  /* Text hierarchy */
  --text-color: #000000;
  --accent-color: #000000;
  --secondary-color: #767676;
  --light-text: #333333;

  /* Highlights */
  --highlight-color: #000000;

  /* Borders */
  --border-color: #E1E1E1;
  --border-glow: #CCCCCC;

  /* Semantic states */
  --error-color: #FF5F56;
  --warning-color: #FFBD2E;
  --success-color: #27C93F;

  /* Code syntax (dark code block) */
  --codeReturn-color: #C678DD;
  --code-color: #98C379;
  --comment-color: #5C6370;

  /* Transparent variants */
  --text-alpha-07: rgba(0, 0, 0, 0.04);
  --accent-alpha-15: rgba(0, 0, 0, 0.06);
  --accent-alpha-25: rgba(0, 0, 0, 0.12);
  --light-alpha-05: rgba(0, 0, 0, 0.03);
  --light-alpha-10: rgba(0, 0, 0, 0.06);
  --glass-blur: blur(0px);
  --glass-blur-heavy: blur(0px);

  /* Typography */
  --font-main: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-alt: 'JetBrains Mono', 'Fira Code', monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 3rem;
  --line-height-normal: 1.65;
  --line-height-tight: 1.2;

  /* Spacing — more generous */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 72px;
  --space-2xl: 100px;
  --max-width: 1100px;

  /* Shadows — subtle Squarespace style */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-inner: none;
  --shadow-glow: none;
  --transition-fast: all 0.15s ease;
  --transition: all 0.25s ease;
  --transition-slow: all 0.4s ease;

  /* Z-index */
  --z-header: 1000;
  --z-overlay: 9999;

  /* Border radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Skill bars */
  --skill-bar-bg: #E8E8E8;
  --skill-bar-fill: #000000;
  --skill-bar-hover: #333333;
}

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

html {
  scroll-padding-top: 80px;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: var(--bg-color);
  color: var(--light-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar — thin, minimal */
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb {
  background-color: #D4D4D4;
  border-radius: var(--radius-full);
}
body::-webkit-scrollbar-thumb:hover { background-color: #AAAAAA; }

::selection {
  background-color: #000;
  color: #fff;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  position: relative;
}
a:hover { opacity: 0.65; text-shadow: none; }
a:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 600;
  color: var(--text-color);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-3xl); margin-bottom: var(--space-md); }
h2 { font-size: var(--font-size-2xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--font-size-xl); margin-bottom: var(--space-sm); }

h2 {
  text-align: center;
  position: relative;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--light-text);
}

ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--light-text);
}

li { margin-bottom: var(--space-xs); }

/* ---- Utilities ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.grid { display: grid; gap: var(--space-md); }
.mt-lg { margin-top: var(--space-xl); }

/* Section label — small caps eyebrow */
.section-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

/* ---- Header ---- */
header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: var(--z-header);
  transition: var(--transition);
  height: 72px;
}
header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  height: 64px;
  box-shadow: 0 1px 0 var(--border-color);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 100%;
  padding: 0 20px;
}

.logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  letter-spacing: -0.03em;
}
.logo:hover { opacity: 0.7; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #000;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}
.logo-text { font-size: var(--font-size-md); font-weight: 600; }
header.scrolled .logo { font-size: var(--font-size-md); }

/* Remove old terminal-style logo pseudo-elements */
.logo-terminal::before,
.cursor-blink::after { content: none; display: none; }

/* ---- Navigation ---- */
nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}
nav li a {
  font-weight: 500;
  font-size: var(--font-size-sm);
  padding: 6px 0;
  color: var(--secondary-color);
  position: relative;
  letter-spacing: 0;
  transition: var(--transition);
}
/* Remove terminal-style nav prefixes */
nav li a::before { content: none; display: none; }
nav li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1.5px;
  background-color: var(--text-color);
  transition: var(--transition);
}
nav li a:hover,
nav li a.active {
  color: var(--text-color);
  opacity: 1;
}
nav li a:hover::after,
nav li a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: var(--font-size-lg);
  padding: 4px;
  z-index: calc(var(--z-header) + 1);
}
.menu-toggle i {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.menu-toggle:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
}

/* ---- Backdrop ---- */
.backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: var(--z-header);
  opacity: 0; visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.backdrop.active { opacity: 1; visibility: visible; }

/* ---- Main ---- */
main { flex: 1; padding-top: 72px; }

.section {
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}
.section:nth-child(even) { background: var(--bg-alt); }

/* Background patterns — much subtler */
.bg-pattern {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.025;
  z-index: 0;
  pointer-events: none;
}
.bg-pattern.dots {
  background-image: radial-gradient(#999 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}
.bg-pattern.grid {
  background-image:
    linear-gradient(to right, #ccc 0.5px, transparent 0.5px),
    linear-gradient(to bottom, #ccc 0.5px, transparent 0.5px);
  background-size: 48px 48px;
}
.bg-pattern.circuit { opacity: 0.02; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ============================================
                  HERO SECTION
============================================ */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: calc(100vh - 72px);
  position: relative;
  overflow: hidden;
  padding: var(--space-2xl) 0;
  background: var(--bg-alt);
}
.hero::before { content: none; }
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--secondary-color);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, var(--font-size-3xl));
  margin-bottom: var(--space-sm);
  color: var(--text-color);
  font-weight: 600;
  position: relative;
  display: inline-block;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero-title::before { content: none; }
.hero-accent {
  color: var(--secondary-color);
  font-weight: 400;
}

.hero-subtitle {
  font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-xl));
  margin-bottom: var(--space-lg);
  color: var(--secondary-color);
  font-weight: 500;
  text-shadow: none;
  letter-spacing: -0.01em;
}
.hero-subtitle:hover { text-shadow: none; }

.hero-text {
  margin-bottom: var(--space-lg);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-normal);
  letter-spacing: 0;
  text-align: center;
  color: var(--secondary-color);
  font-size: var(--font-size-md);
}

/* ---- Command bar (hero CTAs) ---- */
.command-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: var(--space-md);
  position: relative;
  z-index: 2;
}
.cmd-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-color);
  background: var(--bg-color);
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.cmd-link:hover {
  background: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 1;
}
.cmd-primary {
  background: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
  font-weight: 600;
}
.cmd-primary:hover {
  background: #333;
  border-color: #333;
  color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 1;
}
.cmd-prompt { display: none; }

.tech-particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* ============================================
                  ABOUT SECTION
============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}
.about-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 110%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
}
.about-image-inner {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.about-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  filter: none;
  transition: var(--transition-slow);
}
.about-image:hover .about-avatar {
  filter: none;
  transform: scale(1.02);
}
.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Terminal window → clean info card */
.terminal-window {
  position: relative;
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 0;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.terminal-window:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}
.terminal-header {
  position: relative;
  top: auto; left: auto; right: auto;
  height: auto;
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  display: flex;
  align-items: center;
  padding: 12px 20px;
}
.terminal-buttons { display: flex; gap: 6px; }
.terminal-button {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal-button-close { background-color: #FF5F57; }
.terminal-button-minimize { background-color: #FFBD2E; }
.terminal-button-maximize { background-color: #28C840; }
.terminal-title {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--secondary-color);
  font-weight: 500;
}
.terminal-content {
  margin-top: 0;
  padding: var(--space-md);
}

/* About info rows */
.about-info-row {
  display: flex;
  gap: var(--space-sm);
  padding: 12px 0;
  border-bottom: 1px solid #F0F0F0;
}
.about-info-row:last-child { border-bottom: none; }
.about-info-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary-color);
  font-weight: 600;
  min-width: 80px;
  flex-shrink: 0;
  padding-top: 2px;
}
.about-info-value {
  font-size: var(--font-size-sm);
  color: var(--light-text);
  line-height: 1.55;
}
.about-info-value strong {
  color: var(--text-color);
  font-weight: 600;
}

/* Hide old terminal typing/command styles in this theme */
.command-line, .command-output { display: none; }
.typing { animation: none; width: auto; overflow: visible; }

/* ---- Timeline ---- */
.timeline {
  position: relative;
  margin: var(--space-lg) 0;
  padding-left: var(--space-lg);
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; left: 8px;
  height: 100%; width: 1px;
  background-color: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-lg) + 8px);
  top: 6px;
  height: 9px; width: 9px;
  background-color: var(--text-color);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: var(--transition);
}
.timeline-item:hover::before {
  background-color: var(--text-color);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.08);
}
.timeline-date {
  font-size: var(--font-size-xs);
  color: var(--secondary-color);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.timeline-title {
  font-size: var(--font-size-lg);
  color: var(--text-color);
  margin-bottom: 2px;
  font-weight: 600;
}
.timeline-subtitle {
  font-size: var(--font-size-sm);
  color: var(--secondary-color);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}
.timeline-item p {
  font-size: var(--font-size-sm);
  color: var(--light-text);
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ---- Code block (stays dark) ---- */
.code-block {
  background: var(--bg-code);
  border: 1px solid #2a2a4a;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: var(--transition);
  overflow: visible;
}
.code-block:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.code-content {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  font-family: var(--font-alt);
  color: #ABB2BF;
  tab-size: 4;
}
.code-content .keyword { color: var(--codeReturn-color); font-weight: 500; }
.code-content .function { font-weight: 500; color: #61AFEF; text-shadow: none; }
.code-content .string { color: var(--code-color); }
.code-content .comment { color: var(--comment-color); font-style: italic; }
.code-content pre { margin: 0; white-space: pre-wrap; }
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a4a;
  font-size: var(--font-size-sm);
  color: #999;
}
.code-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #999;
  opacity: 0.6;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0.25rem;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
}
.code-copy:hover { opacity: 1; background-color: rgba(255,255,255,0.08); }
.code-copy span {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================
                  SKILLS
============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}
.skill-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.skill-card::before { content: none; }
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glow);
}
.skill-heading {
  position: relative;
  margin-bottom: var(--space-sm);
  color: var(--text-color);
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-lg);
}
.skill-heading::before { content: none; }
.skill-heading i {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--secondary-color);
}
.skill-description {
  color: var(--secondary-color);
  margin-bottom: var(--space-md);
  flex-grow: 1;
  font-size: var(--font-size-sm);
}
.skill-proficiency {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.skill-proficiency-label {
  width: 80px;
  color: var(--light-text);
  font-size: var(--font-size-xs);
  margin-right: 12px;
  font-weight: 500;
}
.skill-proficiency-bar {
  flex-grow: 1;
  height: 4px;
  background-color: var(--skill-bar-bg);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}
.skill-proficiency-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background-color: var(--skill-bar-fill);
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: var(--radius-full);
  max-width: 100%;
}
.skill-card.active .skill-proficiency-fill {
  width: var(--fill-width, 0%);
}
.skill-card.active .skill-proficiency-fill::after { content: none; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-sm);
}
.tag {
  background-color: var(--bg-alt);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--light-text);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  font-weight: 500;
}
.tag:hover {
  background-color: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.skill-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-lg);
}
.skill-filter {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--secondary-color);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  font-weight: 500;
}
.skill-filter:hover {
  border-color: var(--text-color);
  color: var(--text-color);
}
.skill-filter.active {
  background-color: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
}

/* ============================================
                  PROJECTS
============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}
.project-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  height: 100%;
  position: relative;
}
.project-card::after { content: none; }
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glow);
}

.project-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--bg-alt);
  position: relative;
  z-index: 1;
  justify-content: center;
  text-align: center;
}
.project-title {
  color: var(--text-color);
  margin-bottom: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
}
.project-body {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.project-description {
  color: var(--secondary-color);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-sm);
  flex-grow: 1;
  font-size: var(--font-size-sm);
}
.project-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
  margin-bottom: var(--space-xs);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  color: var(--text-color);
}
.project-link:hover {
  background-color: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
  transform: translateY(-1px);
  opacity: 1;
}
.project-link svg, .project-link i {
  width: 14px; height: 14px;
  transition: var(--transition);
  display: inline-flex; align-items: center; flex-shrink: 0;
}
.project-link:hover svg, .project-link:hover i { transform: none; }

.project-footer {
  padding: 10px var(--space-md);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-alt);
  position: relative;
  z-index: 1;
}
.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-item {
  font-size: var(--font-size-xs);
  color: var(--secondary-color);
  background-color: var(--bg-color);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  font-weight: 500;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-lg);
}
.project-filter {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--secondary-color);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  font-weight: 500;
}
.project-filter:hover {
  border-color: var(--text-color);
  color: var(--text-color);
}
.project-filter.active {
  background-color: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
}

/* ---- Project Media ---- */
.project-media {
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-alt);
}
.project-image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  background-color: var(--bg-alt);
}
.full-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
}
.expand-image-btn {
  position: absolute;
  bottom: 10px; right: 10px;
  background-color: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}
.project-image-container:hover .expand-image-btn { opacity: 1; }
.expand-image-btn:hover { background-color: #000; }
.expand-image-btn i {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Image Modal ---- */
.image-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.image-modal.open {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}
.modal-content {
  position: relative;
  width: 90%; max-width: 1100px; max-height: 90vh;
  background-color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
}
.modal-title {
  color: var(--text-color);
  margin-bottom: var(--space-md);
  text-align: center;
  font-size: var(--font-size-lg);
}
.modal-image-container {
  max-width: 90vw; max-height: 90vh;
  display: flex; justify-content: center; align-items: center;
}
.modal-image {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.close-modal {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  color: var(--secondary-color);
  font-size: 28px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.close-modal:hover { color: var(--text-color); transform: none; }

/* ---- Audio Player ---- */
audio { display: none; }
.audio-player {
  width: 100%;
  padding: var(--space-md);
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-color);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.play-btn {
  background: none;
  border: 2px solid var(--text-color);
  color: var(--text-color);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  outline: none;
  z-index: 2;
}
.play-btn:hover, .play-btn:focus {
  background-color: var(--text-color);
  color: #fff;
  transform: scale(1.03);
}
.play-btn.playing {
  background-color: var(--text-color);
  border-color: var(--text-color);
  color: #fff;
}
.audio-progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.audio-progress-bar {
  width: 100%; height: 4px;
  background-color: #E8E8E8;
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.audio-progress-indicator {
  position: absolute;
  top: 0; left: 0;
  height: 100%; width: 0%;
  background-color: #000;
  border-radius: var(--radius-full);
  transition: width 0.1s linear;
}
.audio-progress-indicator::after {
  content: '';
  position: absolute;
  right: -4px; top: -4px;
  width: 12px; height: 12px;
  background-color: #000;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s ease;
}
.audio-progress-bar:hover .audio-progress-indicator::after { transform: scale(1); }
.time-display {
  font-size: var(--font-size-xs);
  color: var(--secondary-color);
  text-align: right;
}

/* ============================================
              CONTACT SECTION
============================================ */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
#contact p { text-align: center; }
.contact-link {
  display: inline-flex;
  gap: 8px;
  color: var(--text-color);
  font-weight: 600;
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  background: var(--bg-color);
  min-width: 200px;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-sm);
}
.contact-link:hover {
  background: var(--text-color);
  color: #fff;
  transform: translateY(-2px);
  border-color: var(--text-color);
  box-shadow: var(--shadow-md);
  opacity: 1;
}
.contact-link svg, .contact-link i {
  stroke: currentColor;
  width: 18px; height: 18px;
  transition: var(--transition);
  display: inline-flex; align-items: center; flex-shrink: 0;
}

/* ---- Footer ---- */
footer {
  background-color: var(--bg-alt);
  color: var(--secondary-color);
  padding: var(--space-lg) 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  position: relative;
}
footer p { color: var(--secondary-color); }
.footer-content { font-size: var(--font-size-sm); }

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-color);
  color: var(--text-color);
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  z-index: var(--z-header);
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover {
  background: var(--text-color);
  color: #fff;
  border-color: var(--text-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.back-to-top:active { transform: translateY(-1px); }
.back-to-top-icon { width: 20px; height: 20px; stroke: currentColor; }

/* ---- Matrix rain (hidden) ---- */
.matrix-rain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
}

/* ---- Tooltip ---- */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background-color: #1a1a1a;
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}
.tooltip:hover::after {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}

/* ============================================
                  BLOG SECTION
============================================ */
.blog-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}
.blog-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 680px;
  width: 100%;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #000;
  opacity: 1;
  box-shadow: none;
}
.blog-card::after { content: none; }
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glow);
}

.blog-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}
.blog-icon-wrapper {
  width: 52px; height: 52px;
  background-color: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.blog-card:hover .blog-icon-wrapper {
  background-color: #000;
  border-color: #000;
  color: #fff;
  transform: none;
}
.blog-card:hover .blog-icon-wrapper .blog-icon,
.blog-card:hover .blog-icon-wrapper i { color: #fff; }
.blog-icon {
  font-size: var(--font-size-xl);
  display: flex; align-items: center; justify-content: center;
}
.blog-icon i {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
}
.blog-header-content { flex: 1; }
.blog-header-content h3 {
  color: var(--text-color);
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin: 0 0 4px 0;
}
.blog-status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--secondary-color);
}
.status-indicator {
  width: 6px; height: 6px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.blog-card-content {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-md);
}
.blog-card-content p {
  color: var(--secondary-color);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}
.blog-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: var(--space-md);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.feature-item:hover {
  background: var(--bg-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  font-size: var(--font-size-md);
  min-width: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--secondary-color);
}
.feature-icon i {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.feature-item span {
  color: var(--light-text);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.blog-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: #000;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.blog-visit-btn::before { content: none; }
.blog-visit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: #333;
  opacity: 1;
}
.blog-visit-btn svg, .blog-visit-btn i {
  transition: var(--transition);
  display: inline-flex; align-items: center; flex-shrink: 0;
  width: 16px; height: 16px;
}
.blog-visit-btn:hover svg, .blog-visit-btn:hover i {
  transform: translate(2px, -2px);
}
.blog-tech-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tech-badge {
  padding: 4px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--secondary-color);
  font-size: var(--font-size-xs);
  font-weight: 500;
  transition: var(--transition);
}
.tech-badge:hover {
  background: #000;
  border-color: #000;
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================
               RESPONSIVE
============================================ */
@media (max-width: 768px) {
  :root {
    --space-xl: 48px;
    --space-2xl: 64px;
  }

  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }

  .container { padding: 0 var(--space-md); }
  .section-inner { padding: 0 var(--space-md); }

  .nav-container { flex-wrap: wrap; }
  .menu-toggle { display: block; }
  nav {
    position: fixed;
    top: 0; right: -100%;
    width: 70%; max-width: 300px;
    height: 100vh;
    background-color: #fff;
    padding: 80px var(--space-md);
    box-shadow: -5px 0 15px rgba(0,0,0,0.08);
    transition: right 0.3s ease;
    border-left: 1px solid var(--border-color);
    z-index: var(--z-header);
  }
  nav.active { right: 0; }
  nav ul { flex-direction: column; gap: var(--space-sm); }
  nav li { width: 100%; }
  nav li a {
    display: block;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
  }
  nav li a:hover, nav li a.active {
    background-color: var(--bg-alt);
    border-color: var(--border-color);
    opacity: 1;
  }

  .hero-title { font-size: var(--font-size-2xl); }
  .hero-subtitle { font-size: var(--font-size-lg); }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .about-image {
    max-width: 280px;
    margin: 0 auto;
    padding-bottom: 100%;
  }

  .timeline { padding-left: var(--space-md); }
  .timeline::before { left: 6px; }
  .timeline-item::before { left: calc(-1 * var(--space-md) + 6px); }

  .contact-links { flex-direction: column; align-items: stretch; }

  .audio-controls {
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm);
  }
  .audio-progress-container { width: 100%; margin-top: var(--space-xs); }
  .time-display { text-align: center; margin-top: 4px; }

  .blog-card { padding: var(--space-md); margin: 0; }
  .blog-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  .blog-icon-wrapper { align-self: flex-start; }
  .blog-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }
  .blog-visit-btn { justify-content: center; }
  .blog-features { grid-template-columns: 1fr; }
  .blog-tech-stack { justify-content: center; }

  .code-block { padding: var(--space-sm); }
  .code-content { font-size: var(--font-size-xs); }
  .code-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 0 var(--space-sm); }
}

@media (max-width: 480px) {
  :root {
    --space-xs: 6px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 28px;
    --space-xl: 40px;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-md: 0.9rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.2rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
  }

  header { height: 60px; }
  header.scrolled { height: 56px; }
  main { padding-top: 60px; }

  .logo-mark { width: 28px; height: 28px; font-size: 12px; }
  .logo-text { font-size: var(--font-size-sm); }

  h1 { font-size: var(--font-size-xl); }
  h2 { font-size: var(--font-size-lg); }
  h3 { font-size: var(--font-size-md); }

  .hero-text { font-size: var(--font-size-sm); }
  .hero-eyebrow { font-size: 0.65rem; }

  .cmd-link { font-size: var(--font-size-xs); padding: 8px 14px; }

  .skill-proficiency-label { width: 65px; font-size: 0.65rem; }

  .timeline { padding-left: var(--space-sm); }
  .timeline::before { left: 4px; }
  .timeline-item::before {
    left: calc(-1 * var(--space-sm) + 4px);
    width: 7px; height: 7px;
  }

  .contact-link {
    min-width: auto;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
  }

  .back-to-top { width: 40px; height: 40px; bottom: 16px; right: 16px; }
  .back-to-top-icon { width: 18px; height: 18px; }

  nav { width: 85%; padding: 70px var(--space-sm); }
  .modal-content { width: 95%; padding: var(--space-sm); }

  .about-info-row { flex-direction: column; gap: 4px; }
  .about-info-label { min-width: auto; }
}
