/* ================================================================
   Portfolio — Complete CSS
   Palette: Teal / Coral / Sky / Honey / Rose — zero purple/violet
   Features: Terminal boot, CLI overlay, GATE bento, full responsive
   ================================================================ */

/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg: #F7F5F2;
  --bg-alt: #FDF8F3;
  --surface: #FFFFFF;
  --border: #E8E2DA;
  --primary: #3A8F85;
  --primary-dark: #2D7A71;
  --primary-light: #7ECEC0;
  --accent-coral: #F2A9A9;
  --accent-sky: #89B4E8;
  --accent-honey: #E8B86D;
  --accent-rose: #D4A0C0;
  --text: #2C3E50;
  --text-secondary: #6B7B8D;
  --text-muted: #A0ADB8;

  --terminal-bg: #0D1117;
  --terminal-text: #7ECEC0;

  --shadow-sm: 0 1px 3px rgba(44, 62, 80, 0.04);
  --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.06);
  --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.08);
  --shadow-xl: 0 16px 48px rgba(44, 62, 80, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 50px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --bg: #1C2A2F;
  --bg-alt: #243338;
  --surface: #2A3A40;
  --border: #3A4A50;
  --primary: #7ECEC0;
  --primary-dark: #3A8F85;
  --primary-light: #A8E6CF;
  --text: #E8ECF0;
  --text-secondary: #A0B4C0;
  --text-muted: #6B8090;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.24);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.28);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection {
  background: var(--primary-light);
  color: var(--text);
}

/* ===== KEYFRAMES ===== */
@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.03); }
  66% { transform: translate(30px, -20px) scale(0.97); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, 30px) scale(1.04); }
  66% { transform: translate(-30px, -30px) scale(0.96); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes slideDown {
  0% { transform: scaleY(0); opacity: 0; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0); opacity: 0; }
}

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

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes boot-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes gate-arrow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}

@keyframes stat-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58, 143, 133, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(58, 143, 133, 0.15); }
}

[data-theme="dark"] .stat-highlight {
  animation-name: stat-glow-pulse-dark;
}

@keyframes stat-glow-pulse-dark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(126, 206, 192, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(126, 206, 192, 0.2); }
}

/* ===== TERMINAL BOOT OVERLAY ===== */
.terminal-boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--terminal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.8s var(--ease);
  pointer-events: auto;
}

.terminal-boot.boot-done {
  opacity: 0;
  pointer-events: none;
}

/* Shared terminal window styles */
.terminal-window {
  background: var(--terminal-bg);
  border: 1px solid #21262D;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: #161B22;
  border-bottom: 1px solid #21262D;
  position: relative;
}

.terminal-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-header .dot.red { background: #FF5F56; }
.terminal-header .dot.yellow { background: #FFBD2E; }
.terminal-header .dot.green { background: #27C93F; }

.terminal-title {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.75rem;
  color: #6B7B8D;
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--terminal-text);
}

/* Boot window */
.boot-window {
  width: 90vw;
  max-width: 700px;
  max-height: 80vh;
}

.boot-window .terminal-body {
  min-height: 280px;
  max-height: 50vh;
  overflow-y: auto;
}

.boot-line {
  opacity: 0;
  animation: fadeInUp 0.3s ease forwards;
  white-space: pre-wrap;
}

/* ===== CLI OVERLAY ===== */
.cli-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

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

.cli-window {
  width: 90vw;
  max-width: 800px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s var(--ease-spring);
}

.cli-overlay.active .cli-window {
  transform: translateY(0) scale(1);
}

.cli-close-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6B7B8D;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.cli-close-btn:hover {
  color: #FF5F56;
}

.cli-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.cli-output {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 8px;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--terminal-text);
  max-height: calc(70vh - 120px);
}

.cli-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.cli-cmd {
  color: #E8B86D;
  font-weight: 600;
}

.cli-echo {
  color: #6B7B8D;
}

.cli-prompt-echo {
  color: #3A8F85;
}

.cli-error {
  color: #F2A9A9;
}

.cli-input-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px 16px;
  border-top: 1px solid #21262D;
}

.cli-prompt {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.82rem;
  color: #3A8F85;
  white-space: nowrap;
  flex-shrink: 0;
}

.cli-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.82rem;
  color: var(--terminal-text);
  caret-color: var(--terminal-text);
}

.cli-input::placeholder {
  color: #3A4A50;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(247, 245, 242, 0.72);
  border-bottom: 1px solid transparent;
  transition: all 0.3s var(--ease);
}

[data-theme="dark"] .navbar {
  background: rgba(28, 42, 47, 0.72);
}

.navbar.scrolled {
  background: rgba(247, 245, 242, 0.88);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(28, 42, 47, 0.88);
}

.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.logo-accent {
  color: var(--primary);
  font-size: 1.8rem;
  line-height: 0;
}

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

.nav-link {
  position: relative;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s var(--ease);
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.3s var(--ease), left 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

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

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--surface);
  background: var(--primary);
  border-radius: var(--radius-pill);
  transition: all 0.3s var(--ease);
}

.btn-nav:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Terminal Button in Navbar */
.terminal-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--primary);
  background: rgba(58, 143, 133, 0.08);
  color: var(--primary);
  font-size: 0.95rem;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.terminal-btn:hover {
  color: var(--surface);
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(58, 143, 133, 0.3);
}

[data-theme="dark"] .terminal-btn {
  border-color: var(--primary);
  background: rgba(126, 206, 192, 0.1);
  color: var(--primary);
}

[data-theme="dark"] .terminal-btn:hover {
  background: var(--primary);
  color: #1C2A2F;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  transform-origin: center;
}

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

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

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

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Gradient Orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  will-change: transform;
}

[data-theme="dark"] .gradient-orb {
  opacity: 0.08;
}

.gradient-orb.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: float-1 25s ease-in-out infinite;
}

.gradient-orb.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-coral) 0%, transparent 70%);
  bottom: -10%;
  left: -5%;
  animation: float-2 22s ease-in-out infinite;
}

.gradient-orb.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-honey) 0%, transparent 70%);
  top: 40%;
  left: 40%;
  animation: float-3 28s ease-in-out infinite;
}

/* Hero Content (left side) */
.hero-content {
  flex: 0 0 55%;
  max-width: 55%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge .badge-dot {
  width: 8px;
  height: 8px;
  background: #3A8F85;
  border-radius: 50%;
  position: relative;
}

.hero-badge .badge-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #3A8F85;
  animation: pulse-ring 2s ease-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-title .line {
  display: block;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-roles {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  min-height: 1.6em;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--surface);
  background: var(--primary);
  border-radius: var(--radius-pill);
  transition: all 0.3s var(--ease);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(58, 143, 133, 0.3);
}

[data-theme="dark"] .btn-primary {
  color: #1C2A2F;
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(126, 206, 192, 0.25);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill);
  transition: all 0.3s var(--ease);
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(58, 143, 133, 0.2);
}

[data-theme="dark"] .btn-outline:hover {
  color: #1C2A2F;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

/* Hero Social Links */
.hero-social {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.social-link,
.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.social-link:hover,
.hero-social a:hover {
  color: var(--surface);
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(58, 143, 133, 0.25);
}

/* Hero Visual (right side) */
.hero-visual {
  flex: 1;
  position: relative;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

.stat-card:nth-child(2) {
  transform: translateY(20px);
}

.stat-card:nth-child(3) {
  transform: translateY(-10px);
}

.stat-card:hover {
  transform: perspective(600px) rotateY(-2deg) rotateX(2deg) translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card:nth-child(2):hover {
  transform: perspective(600px) rotateY(-2deg) rotateX(2deg) translateY(16px);
}

.stat-card:nth-child(3):hover {
  transform: perspective(600px) rotateY(2deg) rotateX(-2deg) translateY(-14px);
}

/* Stat Highlight — GATE card with teal gradient border + glow */
.stat-highlight {
  border: 2px solid transparent;
  background-image: linear-gradient(var(--surface), var(--surface)), linear-gradient(135deg, #3A8F85, #7ECEC0);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: stat-glow-pulse 3s ease-in-out infinite;
}

[data-theme="dark"] .stat-highlight {
  background-image: linear-gradient(var(--surface), var(--surface)), linear-gradient(135deg, #7ECEC0, #A8E6CF);
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.stat-card .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-card .stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.scroll-hint span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 500;
}

.scroll-hint .scroll-line {
  width: 1px;
  height: 40px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-hint .scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform-origin: top;
  animation: slideDown 2s ease-in-out infinite;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
  position: relative;
}

.section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  overflow: hidden;
  position: relative;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.bento-lg {
  grid-column: span 2;
}

.bento-full {
  grid-column: span 3;
}

/* Bento Icon */
.bento-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  font-size: 1.4rem;
  margin-bottom: 20px;
  flex-shrink: 0;
}

[data-theme="dark"] .bento-icon {
  color: #1C2A2F;
}

.bento-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.bento-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

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

/* ===== BENTO GATE CARD ===== */
.bento-gate {
  display: flex;
  flex-direction: column;
}

.gate-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0 12px;
}

.gate-year {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  min-width: 110px;
}

.gate-year-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.gate-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

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

/* Current GATE year gets teal accent */
.gate-current {
  border-color: var(--primary);
  background: rgba(58, 143, 133, 0.06);
}

[data-theme="dark"] .gate-current {
  background: rgba(126, 206, 192, 0.08);
}

.gate-current .gate-rank {
  color: var(--primary);
}

.gate-arrow {
  font-size: 1.2rem;
  color: var(--primary);
  animation: gate-arrow-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.gate-improvement {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

/* Bento Code Block */
.bento-code {
  background: #1C2A2F !important;
  color: #E8ECF0;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}

.bento-code .code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.bento-code .code-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.bento-code .code-header .dot.red { background: #FF5F56; }
.bento-code .code-header .dot.yellow { background: #FFBD2E; }
.bento-code .code-header .dot.green { background: #27C93F; }

.code-filename {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.75rem;
  color: #6B7B8D;
  margin-left: 4px;
}

.code-content {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.bento-code .kw  { color: #7ECEC0; }
.bento-code .var { color: #E8ECF0; }
.bento-code .str { color: #3A8F85; }
.bento-code .key { color: #89B4E8; }
.bento-code .num { color: #F2A9A9; }

/* ===== SKILL GROUPS & PILLS ===== */
.skill-group {
  margin-bottom: 20px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group-title {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
}

.skill-pill:hover {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
  transform: translateY(-1px);
}

[data-theme="dark"] .skill-pill:hover {
  color: #1C2A2F;
}

/* ===== PROJECT FILTERS ===== */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.filter-btn:hover {
  background: rgba(58, 143, 133, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="dark"] .filter-btn:hover {
  background: rgba(126, 206, 192, 0.08);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

[data-theme="dark"] .filter-btn.active {
  color: #1C2A2F;
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Thumb gradients per card — cycling through teal, coral, sky, honey, mint, rose */
.project-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-thumb i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 1;
}

.project-card:nth-child(6n+1) .project-thumb {
  background: linear-gradient(135deg, #3A8F85, #7ECEC0);
}

.project-card:nth-child(6n+2) .project-thumb {
  background: linear-gradient(135deg, #F2A9A9, #E88E8E);
}

.project-card:nth-child(6n+3) .project-thumb {
  background: linear-gradient(135deg, #89B4E8, #6A9AD8);
}

.project-card:nth-child(6n+4) .project-thumb {
  background: linear-gradient(135deg, #E8B86D, #D4A050);
}

.project-card:nth-child(6n+5) .project-thumb {
  background: linear-gradient(135deg, #7ECEC0, #A8E6CF);
}

.project-card:nth-child(6n+6) .project-thumb {
  background: linear-gradient(135deg, #D4A0C0, #C08AAA);
}

.project-body {
  padding: 28px;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.project-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Project Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Project Metrics */
.project-metrics {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric-val {
  font-weight: 600;
  color: var(--text);
}

.metric-key {
  color: var(--text-muted);
}

/* Project Links */
.project-links {
  display: flex;
  gap: 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s var(--ease);
}

.project-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(58, 143, 133, 0.06);
  transform: translateY(-2px);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14px;
  width: 2px;
  height: 100%;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--primary);
  z-index: 1;
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s var(--ease);
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.company-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}

.timeline-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-role {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

.timeline-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.timeline-tasks {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 14px;
}

.timeline-tasks li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.6;
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.achievement-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s var(--ease);
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.achievement-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.4rem;
}

.achievement-card:nth-child(4n+1) .achievement-icon {
  background: rgba(58, 143, 133, 0.12);
  color: var(--primary);
}

.achievement-card:nth-child(4n+2) .achievement-icon {
  background: rgba(242, 169, 169, 0.15);
  color: var(--accent-coral);
}

.achievement-card:nth-child(4n+3) .achievement-icon {
  background: rgba(137, 180, 232, 0.15);
  color: var(--accent-sky);
}

.achievement-card:nth-child(4n+4) .achievement-icon {
  background: rgba(232, 184, 109, 0.15);
  color: var(--accent-honey);
}

.achievement-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.achievement-card p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.achievement-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.achievement-link:hover {
  background: var(--primary);
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(58, 143, 133, 0.25);
}

.achievement-link i {
  font-size: 0.9rem;
}

.achievement-date {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subsection-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  margin-top: 56px;
}

/* ===== CERTIFICATIONS GRID ===== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: all 0.3s var(--ease);
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cert-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.cert-icon-wrap img.cert-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.cert-initial {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

[data-theme="dark"] .cert-initial {
  color: #1C2A2F;
}

.cert-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.cert-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.contact-center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.contact-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
}

.contact-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(58, 143, 133, 0.05);
}

.contact-chip i,
.contact-chip svg {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.footer kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.footer-links {
  display: flex;
  gap: 20px;
}

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

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

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 100;
  cursor: pointer;
  transform: scale(0);
  transition: all 0.3s var(--ease-spring);
  border: none;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .back-to-top {
  color: #1C2A2F;
}

.back-to-top.visible {
  transform: scale(1);
}

.back-to-top:hover {
  transform: scale(1) translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.15rem;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(58, 143, 133, 0.06);
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

/* ===== UTILITY & ANIMATION CLASSES ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== RESPONSIVE -- TABLET (max-width: 968px) ===== */
@media (max-width: 968px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    flex: none;
    max-width: 100%;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-social {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-lg {
    grid-column: span 2;
  }

  .bento-full {
    grid-column: span 2;
  }

  .bento-gate {
    grid-column: span 2;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 8px;
    transition: right 0.35s var(--ease);
    box-shadow: -10px 0 40px rgba(44, 62, 80, 0.08);
    z-index: 999;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1rem;
    padding: 12px 0;
    width: 100%;
  }

  .nav-link::after {
    bottom: 8px;
  }

  .mobile-toggle {
    display: flex;
  }

  .section {
    padding: 72px 0;
  }

  /* Hide terminal btn text on tablet, keep icon */
  .btn-nav {
    padding: 10px 16px;
    font-size: 0;
  }

  .btn-nav i {
    font-size: 0.9rem;
  }
}

/* ===== RESPONSIVE -- MOBILE (max-width: 640px) ===== */
@media (max-width: 640px) {
  .hero {
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-card .stat-number {
    font-size: 1.5rem;
  }

  .stat-card:nth-child(2) {
    transform: translateY(0);
  }

  .stat-card:nth-child(3) {
    transform: translateY(0);
  }

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

  .bento-lg,
  .bento-full,
  .bento-gate {
    grid-column: span 1;
  }

  .gate-comparison {
    gap: 12px;
  }

  .gate-year {
    min-width: 90px;
    padding: 12px 14px;
  }

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

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-dot {
    left: -28px;
  }

  .timeline-content {
    padding: 20px;
  }

  .project-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 0.8rem;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .btn-primary,
  .btn-outline {
    padding: 12px 24px;
    font-size: 0.875rem;
  }

  .btn-lg {
    padding: 14px 28px;
  }

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

  .contact-buttons .btn-primary,
  .contact-buttons .btn-outline {
    justify-content: center;
  }

  .contact-info-row {
    flex-direction: column;
  }

  .footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .scroll-hint {
    display: none;
  }

  .hero-social a,
  .social-link {
    width: 40px;
    height: 40px;
  }

  .project-thumb {
    height: 160px;
  }

  .project-body {
    padding: 20px;
  }

  /* Boot window responsive */
  .boot-window {
    width: 95vw;
  }

  .cli-window {
    width: 95vw;
    max-height: 80vh;
  }

  /* Terminal button hidden label on mobile */
  .terminal-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .btn-nav {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  /* Reduce padding in terminal on mobile */
  .terminal-body {
    padding: 16px;
    font-size: 0.75rem;
  }

  .cli-output {
    padding: 12px 16px 4px;
    font-size: 0.75rem;
  }

  .cli-input-line {
    padding: 8px 16px 12px;
  }
}

/* ===== PRINT ===== */
@media print {
  .navbar,
  .scroll-progress,
  .back-to-top,
  .scroll-hint,
  .hero-bg,
  .terminal-boot,
  .cli-overlay,
  .terminal-btn {
    display: none !important;
  }

  body {
    background: none;
    color: #2C3E50;
  }

  .section {
    padding: 32px 0;
  }
}
