/*
  Sefat Khan – Ethical Hacker & Cyber Security Specialist
  Dark hacker theme with neon accents, responsive layout, and subtle animations
*/

:root {
  --bg: #0a0f0d;
  --bg-alt: #0e1512;
  --surface: #0f1d19;
  --text: #d9f7e8;
  --muted: #9ad8bf;
  --primary: #17f597;
  --primary-700: #0fd17d;
  --secondary: #00d4ff;
  --danger: #ff4d6d;
  --shadow: 0 10px 30px rgba(23, 245, 151, 0.1);
}

/* Enhanced Typography */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Improved font stack with better fallbacks */
h1, h2, h3 { 
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
  letter-spacing: -0.02em; 
  font-weight: 600;
  line-height: 1.2;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0a0f0d 0%, #101a16 100%);
  line-height: 1.7;
  font-size: clamp(16px, 1vw + 12px, 20px);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}
html { 
  -webkit-text-size-adjust: 100%; 
  -ms-text-size-adjust: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
a, button, input, textarea { 
  -webkit-tap-highlight-color: rgba(0,0,0,0); 
  touch-action: manipulation; 
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Responsive media */
img, video, canvas, svg { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

/* Prevent text overflow on small screens */
h1, h2, h3, p, li, .btn { 
  overflow-wrap: break-word; 
  word-break: break-word; 
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* Scroll progress bar */
.progress-bar { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,0.06); z-index: 1001; }
.progress-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--secondary), var(--primary)); box-shadow: 0 2px 10px rgba(23,245,151,.25); }

/* Optimized base transitions - only essential properties */
* { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }

.skip-link {
  position: absolute; left: -9999px; top: auto;
}
.skip-link:focus {
  left: 1rem; top: 1rem; background: var(--primary); color: #001b12; padding: .5rem .75rem; border-radius: .375rem;
}

/* Layout */
.container { width: min(1200px, 95%); margin: 0 auto; padding: 0 1rem; }
.container.wide { width: min(1320px, 92%); }
.section { padding: 4rem 0; position: relative; }
.section.alt { background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0, 255, 170, 0.04) 100%); }
.grid.two { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 820px) { .grid.two { grid-template-columns: 1.2fr .8fr; } }
@media (min-width: 1200px) { .section { padding: 6rem 0; } }

/* Enhanced heading styles */
h1 { 
  font-size: clamp(2.2rem, 4vw + 1rem, 3.8rem); 
  margin: 0 0 .5rem; 
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 { 
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.2rem); 
  margin: 0 0 1rem; 
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h3 { 
  font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.3rem); 
  margin: 0 0 .5rem; 
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

/* Improved paragraph and text styling */
p { 
  margin: 0 0 1.2rem; 
  color: var(--muted); 
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.005em;
}

/* Enhanced text hierarchy */
.subtitle { 
  font-weight: 500; 
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.subtitle.big { 
  font-size: clamp(1.2rem, 1.5vw + 1rem, 1.5rem); 
  color: #cfeadf; 
  font-weight: 500;
  letter-spacing: -0.015em;
}
ul { padding-left: 1.1rem; }
@media (min-width: 980px) { .hero-title { white-space: nowrap; } }

/* Reusable page hero */
.page-hero { position: relative; margin: 1rem 0 1.4rem; padding: 1rem; border-radius: .9rem; border: 1px solid rgba(0,212,255,.25); background: radial-gradient(900px 200px at -10% -10%, rgba(103,255,76,.06), transparent 40%), linear-gradient(180deg, rgba(0,0,0,0), rgba(0,212,255,.05)); box-shadow: 0 10px 28px rgba(0,212,255,.08); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; background: conic-gradient(from 0deg, rgba(103,255,76,.0), rgba(103,255,76,.25), rgba(0,212,255,.25), rgba(103,255,76,.0)); filter: blur(10px); opacity: .25; animation: spin 20s linear infinite; pointer-events: none; }
.page-hero h1 { margin: 0 0 .25rem; }
.page-hero .subtitle { margin: 0; opacity: .95; }

/* Stagger utility: children reveals get progressive delays */
.stagger .reveal { will-change: transform, opacity; }

/* Header / Nav (new minimal version) */
.header { position: sticky; top: 0; z-index: 50; background: rgba(10, 15, 13, 0.7); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(23, 245, 151, 0.12); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { text-decoration: none; color: var(--text); font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: .2px; }
.brand .dot { color: #6CFF58; }

.nav-menu { position: relative; }
.nav-toggle { display: inline-flex; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.15); border-radius: .5rem; padding: .35rem .55rem; cursor: pointer; }
.nav-links { list-style: none; margin: 0; padding: .75rem; position: absolute; right: 0; top: 110%; background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-radius: .75rem; display: none; min-width: 220px; box-shadow: 0 10px 30px rgba(23, 245, 151, 0.1); }
.nav-links a { display: block; color: var(--text); text-decoration: none; padding: .5rem .75rem; border-radius: .5rem; position: relative; overflow: hidden; font-weight: 600; font-size: 1.05rem; }
.nav-links a:hover, .nav-links a.active { background: rgba(23, 245, 151, 0.15); color: var(--primary); }
.nav-links a::after { content: ""; position: absolute; left: 10%; right: 90%; bottom: 8px; height: 2px; background: linear-gradient(90deg, var(--secondary), var(--primary)); transition: left .25s ease, right .25s ease; opacity: .8; }
.nav-links a:hover::after, .nav-links a.active::after { left: 10%; right: 10%; }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .nav-links { position: static; display: flex; background: transparent; border: 0; box-shadow: none; padding: 0; gap: .25rem; min-width: initial; }
  .nav-links a { padding: .4rem .65rem; }
}

/* Hero */
.hero { padding-top: 7rem; padding-bottom: 4rem; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 12px 12px; opacity: .25; pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 980px) { .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 3rem; } }
@media (min-width: 1300px) { .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 4rem; } }
.subtitle { color: var(--secondary); font-weight: 600; margin-bottom: .35rem; }
.subtitle.big { font-size: clamp(1.05rem, .7vw + 1rem, 1.35rem); color: #cfeadf; }
.accent { color: #67ff4c; }
.badge { display: inline-block; font-family: 'Roboto Mono', monospace; text-transform: uppercase; letter-spacing: .12em; background: rgba(108,255,88,.12); color: #67ff4c; border: 1px solid rgba(108,255,88,.35); padding: .35rem .6rem; border-radius: .4rem; margin-bottom: .75rem; font-weight: 700; }

/* Availability pill animation */
.availability { --c1:#67ff4c; --c2:#00d4ff; display: inline-flex; align-items: center; gap: .45rem; font-family: 'Roboto Mono', monospace; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; padding: .38rem .65rem; border-radius: 999px; color: #03150f; background: linear-gradient(90deg, var(--c1), var(--c2)); border: 1px solid rgba(0,0,0,.35); box-shadow: 0 8px 18px rgba(0,0,0,.25), 0 0 24px rgba(23,245,151,.18); position: relative; isolation: isolate; }
.availability::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); animation: pulse 1.6s ease-in-out infinite; }
.availability::after { content: "•"; color: rgba(0,0,0,.55); filter: blur(.6px); position: relative; top: -1px; }
@keyframes pulse { 0% { transform: scale(.9); opacity: .8; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(.9); opacity: .8; } }
.hero-copy { color: #bfe7d7; max-width: 60ch; }
.hero-profile { display: block; width: min(40vw, 360px); max-width: 100%; border-radius: 1rem; margin: 1.5rem 0 0 auto; border: 2px solid rgba(108,255,88,.35); box-shadow: 0 0 30px rgba(108,255,88,.25); }
@media (min-width: 980px) { .hero-profile { margin-right: 0; } }
.tagline { font-family: 'Roboto Mono', monospace; color: var(--muted); min-height: 2.2rem; }
.hero-cta { display: flex; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }

.hero-visual { position: relative; justify-self: center; }
@media (min-width: 980px) { .hero-visual { justify-self: start; } }
/* Hex frame */
.hex-card { position: relative; width: min(72vw, 360px); aspect-ratio: 1/1; display: grid; place-items: center; perspective: 800px; cursor: pointer; }
@media (min-width: 1200px) { .hex-card { width: 420px; } }
.hex-card { animation: floaty 6s ease-in-out infinite; }
.hex { position: absolute; inset: 0; background: #0f1d19; clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%); border: 2px solid rgba(108, 255, 88, .45); box-shadow: 0 0 30px rgba(108,255,88,.35), inset 0 0 40px rgba(108,255,88,.08); border-radius: 22px; z-index: 0; }
.hex::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; clip-path: inherit; background: conic-gradient(from 0deg, rgba(103,255,76,.0), rgba(103,255,76,.45), rgba(0,212,255,.45), rgba(103,255,76,.0)); filter: blur(8px); opacity: .35; animation: spin 16s linear infinite; }
.hex::before { content: ""; position: absolute; inset: 0; border-radius: inherit; clip-path: inherit; background: radial-gradient(260px 60px at var(--mx, 50%) var(--my, 50%), rgba(103,255,76,.18), transparent 55%); opacity: 0; transition: opacity .25s ease; }
.hex-card:hover .hex::before { opacity: 1; }
.hex-inner { width: 82%; height: 82%; background: #bfc5c3; clip-path: inherit; border-radius: 18px; box-shadow: inset 0 0 0 3px rgba(0,0,0,.55), 0 10px 30px rgba(0,0,0,.35), 0 0 0 2px rgba(103,255,76,.35), 0 0 22px rgba(103,255,76,.18); background-image: url('assets/Profile.jpg'); background-size: cover; background-position: center 35%; position: relative; z-index: 1; overflow: hidden; filter: contrast(1.03) saturate(1.08); transform: translateZ(20px); }
.hex-card:hover .hex-inner { transform: translateZ(20px) scale(1.03); }
.hex-inner::after { content: ""; position: absolute; inset: -40% -60% auto -60%; height: 140%; background: linear-gradient(120deg, rgba(255,255,255,.0) 20%, rgba(255,255,255,.22) 40%, rgba(255,255,255,.0) 60%); transform: translateX(-100%) rotate(8deg); animation: shine 5s ease-in-out infinite; opacity: .7; }

/* Hero text accents */
.hero-title .accent { background: linear-gradient(90deg, #67ff4c, #00d4ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 20px rgba(0,212,255,.15); }

/* Enhanced button typography */
.btn { 
  --ring: rgba(23, 245, 151, 0.45); 
  display: inline-flex; 
  align-items: center; 
  gap: .5rem; 
  padding: .7rem 1rem; 
  border-radius: .6rem; 
  text-decoration: none; 
  cursor: pointer; 
  font-weight: 600; 
  letter-spacing: -0.01em; 
  font-size: 0.95rem;
  line-height: 1.4;
  transition: box-shadow .2s ease, background .2s ease, color .2s ease; 
}
.btn:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #012016; background: linear-gradient(180deg, var(--primary), var(--primary-700)); border: 1px solid rgba(0,0,0,.4); box-shadow: 0 8px 18px rgba(23, 245, 151, 0.2); }
.btn-ghost { color: var(--primary); background: rgba(23, 245, 151, 0.12); border: 1px solid rgba(23, 245, 151, 0.25); }
.btn-small { padding: .5rem .7rem; font-size: .9rem; }
.btn-primary:hover { box-shadow: 0 16px 28px rgba(23,245,151,.28); }
.btn-ghost:hover { background: rgba(23,245,151,.18); }

/* Cards & Grids */
.icon-row { display: flex; gap: .8rem; margin-top: 1rem; }
.icon { width: 36px; height: 36px; display: grid; place-items: center; color: #bfe7d7; border: 1px solid rgba(255,255,255,0.12); border-radius: .5rem; text-decoration: none; }
.icon:hover { color: #67ff4c; border-color: rgba(108,255,88,.5); box-shadow: 0 0 0 3px rgba(108,255,88,.15); }
.highlights { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: .6rem; }
.highlights li { background: rgba(0, 255, 170, 0.06); border: 1px solid rgba(23,245,151,0.2); padding: .75rem .9rem; border-radius: .6rem; }

/* About section enhancements */
.about-pane { position: relative; }
.about-meta { display: flex; flex-wrap: wrap; gap: .5rem .8rem; list-style: none; padding: 0; margin: .6rem 0 1rem; font-family: 'Roboto Mono', monospace; color: var(--muted); }
.about-meta li { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: .5rem; padding: .25rem .5rem; }
.about-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .8rem; margin-top: 1rem; }
.about-stats .stat { background: rgba(0, 212, 255, 0.06); border: 1px solid rgba(0, 212, 255, 0.25); border-radius: .7rem; padding: .7rem; text-align: center; box-shadow: 0 8px 22px rgba(0,212,255,.08); transform: translateY(6px); opacity: 0; }
.about-pane.visible .about-stats .stat { animation: stat-in .8s ease forwards; }
.about-stats .stat:nth-child(2) { animation-delay: .12s; }
.about-stats .stat:nth-child(3) { animation-delay: .24s; }
.about-stats .num { display: block; font-weight: 800; font-size: clamp(1rem, 2vw + .6rem, 1.6rem); color: var(--primary); }
.about-stats .label { display: block; font-family: 'Roboto Mono', monospace; color: var(--muted); font-size: .85rem; }

.about-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.about-tools span { font-family: 'Roboto Mono', monospace; font-size: .85rem; padding: .25rem .5rem; border-radius: .35rem; border: 1px solid rgba(103,255,76,.35); color: #67ff4c; background: rgba(103,255,76,.08); }
.about-cta { display: flex; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }

.about-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.about-cards li { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(103,255,76,.06), rgba(0,0,0,0)); border-color: rgba(103,255,76,.35); padding: 1rem; transition: box-shadow .25s ease, border-color .25s ease; }
.about-cards li h3 { color: #67ff4c; margin-bottom: .25rem; }
.about-cards li::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 40px at var(--mx, 50%) var(--my, 120%), rgba(103,255,76,.15), transparent 40%); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.about-cards li:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(103,255,76,.18); border-color: rgba(103,255,76,.6); }
.about-cards li:hover::after { opacity: 1; }

@keyframes stat-in { to { transform: translateY(0); opacity: 1; } }

.skills-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
@media (min-width: 1100px) { .skills-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; } }
.skill-card { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(0, 255, 170, 0.06), rgba(0,0,0,0)); padding: 1rem; border-radius: .9rem; border: 1px solid rgba(23,245,151,0.28); box-shadow: var(--shadow); transform-style: preserve-3d; }
.skill-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 60px at var(--mx, 50%) var(--my, 120%), rgba(103,255,76,.18), transparent 40%); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.skill-card:hover::after { opacity: 1; }
.skill-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.skill-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: .6rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: 1.05rem; }
.skill-tags { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-tags li { font-family: 'Roboto Mono', monospace; font-size: .8rem; padding: .2rem .45rem; border-radius: .35rem; border: 1px solid rgba(0, 212, 255, 0.35); color: var(--secondary); background: rgba(0, 212, 255, 0.08); }
.meter { --c1: var(--primary); --c2: var(--secondary); position: relative; height: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; margin-top: .6rem; overflow: hidden; }
.meter span { position: absolute; inset: 0 auto 0 0; width: var(--level, 80%); background: linear-gradient(90deg, var(--c1), var(--c2)); box-shadow: 0 6px 16px rgba(0,0,0,.25), 0 0 24px rgba(23,245,151,.2); border-right: 1px solid rgba(255,255,255,0.35); transform: translateZ(20px); }
.reveal.visible .meter span { animation: fill 1.1s cubic-bezier(.22,.9,.3,1) both; }
@keyframes fill { from { width: 0; } to { width: var(--level, 80%); } }

.projects-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
@media (min-width: 1100px) { .projects-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; } }
.project-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, rgba(0, 212, 255, 0.05), rgba(0,0,0,0)); border: 1px solid rgba(0, 212, 255, 0.25); border-radius: .9rem; padding: 1rem; gap: .8rem; box-shadow: 0 8px 24px rgba(0, 212, 255, 0.08); overflow: hidden; }
.project-card { perspective: 800px; transform-style: preserve-3d; }
.project-card:hover { box-shadow: 0 18px 44px rgba(0, 212, 255, 0.15); }
.project-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(350px 60px at var(--mx, 50%) var(--my, 120%), rgba(0,212,255,.18), transparent 40%); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.project-card:hover::after { opacity: 1; }
.project-media { display: grid; place-items: center; font-size: 2rem; width: 100%; height: 140px; border-radius: .6rem; background: radial-gradient(600px 160px at -10% -10%, rgba(103,255,76,.06), transparent 40%), linear-gradient(180deg, rgba(0,0,0,0), rgba(0, 212, 255, 0.05)); border: 1px solid rgba(0, 212, 255, 0.25); }
.project-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .25rem; }
.status-badge { display: inline-block; font-family: 'Roboto Mono', monospace; letter-spacing: .12em; text-transform: uppercase; padding: .2rem .45rem; border-radius: .35rem; color: #001b12; background: var(--primary); border: 1px solid rgba(0,0,0,.2); box-shadow: 0 6px 16px rgba(23,245,151,.18); }
.status-badge.alt { background: var(--secondary); color: #00141c; }
.status-badge.warn { background: #ffcf4d; color: #1a1200; border-color: rgba(0,0,0,.2); }
.project-meta { list-style: none; padding: 0; margin: .4rem 0 .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.project-meta li { font-family: 'Roboto Mono', monospace; font-size: .8rem; padding: .2rem .45rem; border-radius: .35rem; border: 1px solid rgba(103,255,76,.35); color: #67ff4c; background: rgba(103,255,76,.08); }
.project-body p { margin-bottom: .75rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span { font-family: 'Roboto Mono', monospace; font-size: .8rem; padding: .2rem .45rem; border-radius: .35rem; border: 1px solid rgba(0, 212, 255, 0.35); color: var(--secondary); background: rgba(0, 212, 255, 0.08); }

/* Gallery */
.gallery-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.gallery-item { position: relative; border-radius: .6rem; overflow: hidden; border: 1px solid rgba(23,245,151,0.2); background: rgba(0,0,0,.15); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; filter: saturate(1.05) contrast(1.02); }
.gallery-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .35rem .5rem; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55)); font-size: .85rem; color: #e6fff5; }

/* Gallery categories */
.gallery-cats { display: grid; gap: 1.2rem; }
.gallery-cat { border: 1px solid rgba(255,255,255,0.08); border-radius: .9rem; padding: 1rem; background: rgba(255,255,255,0.02); }
.gallery-cat h3 { margin: 0 0 .6rem; color: #67ff4c; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,.85); z-index: 1200; }
.lightbox.open { display: grid; }
.lightbox-inner { position: relative; max-width: min(92vw, 1000px); width: 100%; }
.lightbox img { width: 100%; height: auto; border-radius: .7rem; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-cap { margin-top: .5rem; color: var(--muted); text-align: left; }
.lightbox .lb-close { position: absolute; top: -12px; right: -12px; width: 40px; height: 40px; border-radius: .6rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: var(--text); display: grid; place-items: center; cursor: pointer; }

/* Blog tweaks (reuse project card styles) */
.blog-post .meta { font-family: 'Roboto Mono', monospace; color: var(--muted); opacity: .9; margin-bottom: .4rem; }
.blog-post h3 { margin-bottom: .15rem; }

/* Testimonials */
.testimonials-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.testimonial-card { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(103,255,76,0.06), rgba(0,0,0,0)); border: 1px solid rgba(103,255,76,0.28); border-radius: .9rem; padding: 1rem; box-shadow: 0 8px 24px rgba(103,255,76,0.08); transform-style: preserve-3d; }
.testimonial-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(450px 60px at var(--mx, 50%) var(--my, 120%), rgba(103,255,76,.18), transparent 40%); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.testimonial-card:hover::after { opacity: 1; }
.testimonial-card .quote { font-size: 1.02rem; color: #d3fae8; }
.testimonial-card .person { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; }
.testimonial-card .avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: .6rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }

/* Certifications */
.certs-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
@media (min-width: 1100px) { .certs-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; } }
.cert-card { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(0, 212, 255, 0.06), rgba(0,0,0,0)); border: 1px solid rgba(0, 212, 255, 0.28); border-radius: .9rem; padding: 1rem; box-shadow: 0 8px 24px rgba(0, 212, 255, 0.08); transform-style: preserve-3d; }
.cert-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(450px 60px at var(--mx, 50%) var(--my, 120%), rgba(0,212,255,.18), transparent 40%); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.cert-card:hover::after { opacity: 1; }
.cert-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.cert-badge { display: inline-block; font-weight: 800; font-family: 'Roboto Mono', monospace; color: #001b12; background: var(--primary); padding: .2rem .5rem; border-radius: .35rem; border: 1px solid rgba(0,0,0,.2); box-shadow: 0 6px 16px rgba(23,245,151,.18); }
.cert-card p { margin: .4rem 0 .6rem; }
.cert-meta { display: flex; flex-wrap: wrap; gap: .5rem .8rem; font-family: 'Roboto Mono', monospace; font-size: .9rem; color: var(--muted); }

/* Enhanced form typography */
input, textarea { 
  font-family: inherit; 
  font-size: 1rem; 
  font-weight: 400; 
  letter-spacing: -0.005em;
  line-height: 1.5;
}

label { 
  font-weight: 600; 
  letter-spacing: -0.01em;
  font-size: 0.95rem;
}

/* Enhanced card text styling */
.skill-card h3,
.project-card h3,
.cert-card h3,
.testimonial-card h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.skill-card p,
.project-card p,
.cert-card p,
.testimonial-card .quote {
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
}

/* Enhanced meta text styling */
.about-meta li,
.cert-meta span,
.project-meta li,
.skill-tags li,
.tags span {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
  font-size: 0.9rem;
}

/* Contact */
.contact-grid { align-items: start; }
.contact-card { background: radial-gradient(800px 160px at -10% -10%, rgba(103,255,76,.06), transparent 40%), linear-gradient(180deg, rgba(0,0,0,0), rgba(0, 212, 255, 0.05)); border: 1px solid rgba(0, 212, 255, 0.25); padding: 1rem; border-radius: .9rem; box-shadow: 0 8px 24px rgba(0, 212, 255, 0.08); }
.contact-card h2 { margin-bottom: .6rem; }
.contact-form { margin-top: .6rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.field { display: grid; gap: .35rem; margin-bottom: .8rem; }
@media (min-width: 720px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { font-weight: 600; }
input, textarea { width: 100%; background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid rgba(255,255,255,0.15); border-radius: .6rem; padding: .7rem .8rem; font-family: inherit; }
input:focus, textarea:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18); }
.error { color: var(--danger); min-height: 1.1rem; }
.form-note { font-size: .9rem; opacity: .8; }
.btn-block { width: 100%; justify-content: center; }
.send-icon { filter: drop-shadow(0 2px 8px rgba(23,245,151,.25)); }

/* Contact Aside */
.contact-aside { background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0, 255, 170, 0.04)); border: 1px solid rgba(23,245,151,0.2); padding: 1rem; border-radius: .9rem; box-shadow: 0 8px 24px rgba(23, 245, 151, 0.08); display: grid; gap: 1rem; }
.contact-aside h3 { margin: 0; }
.contact-items { list-style: none; padding: 0; display: grid; gap: .6rem; }
.contact-item { display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: .6rem; padding: .6rem; border: 1px solid rgba(255,255,255,0.08); border-radius: .7rem; background: rgba(255,255,255,0.02); }
.contact-item a { color: var(--text); text-decoration: none; }
.contact-item a:hover { color: var(--primary); }
.contact-item small { display: block; color: var(--muted); margin-top: .1rem; }
.ci { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: .6rem; border: 1px solid rgba(255,255,255,0.12); color: var(--text); background: rgba(255,255,255,0.02); font-weight: 700; }
.pro-contact { border: 1px solid rgba(255,255,255,0.08); border-radius: .8rem; padding: .9rem; background: rgba(255,255,255,0.02); }
.pro-contact h4 { margin: 0 0 .35rem; }
.pro-contact .muted { color: var(--muted); font-size: .95rem; }

/* Social icons */
.socials { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }
.social { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: .6rem; border: 1px solid rgba(255,255,255,0.12); color: var(--text); background: rgba(255,255,255,0.02); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social:hover { color: var(--primary); border-color: rgba(23,245,151,.5); box-shadow: 0 0 0 3px rgba(23,245,151,.15); }

/* Footer */
.footer { padding: 2.2rem 0 2.6rem; border-top: 1px solid rgba(255,255,255,0.08); background: linear-gradient(0deg, rgba(0, 255, 170, 0.04) 0%, rgba(0,0,0,0) 100%); }
.footer { padding-bottom: calc(2.6rem + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr .6fr .6fr; } }
.footer-brand p { color: var(--muted); max-width: 46ch; }
.footer-brand .footer-socials { display: flex; gap: .5rem; margin-top: .6rem; }
.footer-brand .footer-socials a { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: .4rem; border: 1px solid rgba(255,255,255,0.12); color: var(--text); background: rgba(255,255,255,0.02); text-decoration: none; font-size: .85rem; }
.footer-brand .footer-socials a:hover { color: var(--primary); border-color: rgba(23,245,151,.5); }
.footer-col h4 { margin: 0 0 .6rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-col a { color: var(--text); text-decoration: none; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; }
.footer-bottom p { margin: 0; color: var(--muted); }
.made .heart { color: #ff6b9a; text-shadow: 0 0 12px rgba(255,107,154,.25); }
.made .sig { color: var(--muted); }

/* 404 page */
.not-found { text-align: center; padding: 2rem; }
.not-found h1 { font-size: clamp(2rem, 4vw + 1rem, 4rem); margin: 0 0 .5rem; }
.not-found p { color: var(--muted); margin-bottom: 1rem; }
.not-found .glow { display: inline-block; padding: .5rem .9rem; border-radius: .7rem; border: 1px solid rgba(23,245,151,.35); background: rgba(23,245,151,.12); color: var(--primary); text-decoration: none; font-weight: 700; box-shadow: 0 8px 18px rgba(23,245,151,.18); }
.big-404 { font-family: 'Roboto Mono', monospace; letter-spacing: .12em; color: #67ff4c; text-shadow: 0 0 20px rgba(103,255,76,.3); }

/* Back to top */
.back-to-top { position: fixed; right: 1rem; bottom: 1rem; width: 40px; height: 40px; border-radius: .6rem; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; z-index: 1001; }
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }

/* Glitch effect toned down for clarity */
.glitch { position: relative; display: inline-block; text-shadow: none; }
.glitch::before, .glitch::after { content: none; }

/* Typing */
.typing { border-right: 2px solid var(--secondary); white-space: nowrap; overflow: hidden; display: inline-block; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.visible { animation: subtle-pop .6s ease both; }

/* Clickable cards via data-href */
[data-href] { cursor: pointer; }
[data-href]:hover { filter: brightness(1.04); }

@keyframes subtle-pop { 0% { transform: translateY(14px) scale(.98); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine { 0%, 85% { transform: translateX(-120%) rotate(8deg); } 100% { transform: translateX(120%) rotate(8deg); } }

/* Mobile adjustments */
@media (max-width: 520px) {
  /* Prevent zoom on double tap */
  * {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Allow text selection in input fields */
  input, textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
  
  /* Enhanced mobile typography */
  body {
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.005em;
  }
  
  h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-weight: 700;
  }
  
  h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    line-height: 1.2;
    margin-bottom: 0.8rem;
  }
  
  h3 {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    line-height: 1.3;
  }
  
  p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  /* Enhanced mobile hero section */
  .hero { 
    padding-top: 3.5rem; 
    padding-bottom: 2.5rem; 
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
  
  .hero-inner { 
    gap: 2rem; 
    text-align: center;
  }
  
  .hero-visual {
    order: 1;
    margin-bottom: 1rem;
  }
  
  .hero-text {
    order: 2;
  }
  
  .hex-card { 
    width: min(85vw, 300px); 
    margin: 0 auto;
    animation: mobile-float 4s ease-in-out infinite;
  }
  
  @keyframes mobile-float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.02); }
  }
  
  .hero-title { 
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #67ff4c, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  .subtitle.big { 
    font-size: clamp(1rem, 5vw, 1.3rem);
    margin-bottom: 1rem;
    color: #cfeadf;
    font-weight: 500;
  }
  
  .hero-copy { 
    font-size: 0.95rem; 
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #bfe7d7;
  }
  
  .availability {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    margin-bottom: 1rem;
  }
  
  .hero-cta {
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
  }
  
  .btn {
    min-height: 48px;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 0.8rem;
    box-shadow: 0 4px 12px rgba(23, 245, 151, 0.2);
  }
  
  .icon-row {
    justify-content: center;
    gap: 1rem;
  }
  
  .icon {
    width: 44px;
    height: 44px;
    border-radius: 0.8rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
  }
  
  .icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 20px rgba(103, 255, 76, 0.3);
  }

  /* Mobile-specific animations */
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
  }
  
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Mobile loading states */
  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* Mobile scroll indicators */
  .scroll-indicator {
    position: fixed;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
  }
  
  .scroll-dot.active {
    background: var(--primary);
    transform: scale(1.2);
  }
  
  /* Mobile progress bar */
  .progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1000;
    transition: width 0.3s ease;
  }
}

/* Decorative background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; width: 60vmax; height: 60vmax; filter: blur(60px); opacity: .25; border-radius: 50%; will-change: transform; transform: translate3d(0,0,0); }
.blob-a { left: -10vmax; top: -10vmax; background: radial-gradient(circle at 30% 30%, var(--secondary), transparent 60%); animation: float-a 30s ease-in-out infinite; }
.blob-b { right: -15vmax; bottom: -15vmax; background: radial-gradient(circle at 70% 70%, var(--primary), transparent 60%); animation: float-b 35s ease-in-out infinite; }
@keyframes float-a { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(2vmax, 1.5vmax) scale(1.02); } }
@keyframes float-b { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(-1.5vmax, -1vmax) scale(1.03); } }

/* Floating icons */
.float-icons { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.fi { position: absolute; top: 10%; left: 10%; font-size: clamp(18px, 2.2vw, 28px); opacity: .18; animation: drift 25s ease-in-out infinite; filter: drop-shadow(0 4px 18px rgba(0,0,0,.25)); will-change: transform; transform: translate3d(0,0,0); }
.fi:nth-child(2) { top: 20%; left: 75%; animation-duration: 30s; }
.fi:nth-child(3) { top: 65%; left: 15%; animation-duration: 35s; }
.fi:nth-child(4) { top: 75%; left: 70%; animation-duration: 40s; }
.fi:nth-child(5) { top: 40%; left: 50%; animation-duration: 28s; }
.fi:nth-child(6) { top: 30%; left: 30%; animation-duration: 45s; }
@keyframes drift { 0%, 100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(6px, -5px) rotate(4deg); } }

/* Preloader */
.preloader { position: fixed; inset: 0; background: radial-gradient(1200px 400px at 30% 30%, rgba(0,212,255,.08), rgba(0,0,0,.9)); display: grid; place-items: center; z-index: 1000; }
.preloader-inner { display: grid; place-items: center; gap: .6rem; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: #67ff4c; border-right-color: #00d4ff; animation: spin 1s linear infinite; }
.pre-text { font-family: 'Roboto Mono', monospace; letter-spacing: .12em; color: var(--muted); }
.preloader.fade-out { animation: pre-fade .5s ease forwards; }
@keyframes pre-fade { to { opacity: 0; visibility: hidden; } }

/* Utilities */
.hidden { display: none !important; }
/* Hide honeypot visually while keeping in DOM for bots */
#company.hidden { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }


/* Mobile refinements */
@media (max-width: 520px) {
  .container { width: 100%; padding: 0 1rem; }
  /* Typography and spacing */
  h1 { margin-bottom: .15rem; }
  h2 { margin-bottom: .6rem; }
  p { margin-bottom: .8rem; }
  .section { padding: 3.2rem 0; }

  /* Enhanced mobile navigation */
  .header {
    backdrop-filter: blur(20px);
    background: rgba(10, 15, 13, 0.9);
    border-bottom: 1px solid rgba(23, 245, 151, 0.2);
  }
  
  .nav { 
    height: 60px; 
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
  }
  
  .nav-toggle { 
    padding: 0.6rem; 
    background: rgba(23, 245, 151, 0.1);
    border: 1px solid rgba(23, 245, 151, 0.3);
    border-radius: 0.6rem;
    color: var(--primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
  }
  
  .nav-toggle:hover {
    background: rgba(23, 245, 151, 0.2);
    transform: scale(1.05);
  }
  
  .nav-links { 
    position: fixed; 
    top: 60px; 
    left: 0; 
    right: 0; 
    background: rgba(15, 29, 25, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(23, 245, 151, 0.2); 
    border-radius: 0 0 1rem 1rem; 
    box-shadow: 0 20px 40px rgba(23, 245, 151, 0.15);
    z-index: 1000;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
  }
  
  .nav-links.show {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links a { 
    padding: 1rem 1.5rem; 
    display: block;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(23, 245, 151, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    transform: translateX(5px);
  }

  /* Hero */
  .hero { padding-top: 4.75rem; padding-bottom: 2.5rem; }
  .subtitle.big { font-size: 1rem; }
  .hero-cta { gap: .6rem; }
  .icon-row { gap: .6rem; }
  .icon { width: 36px; height: 36px; }

  /* Touch targets and inputs */
  .btn, .nav-links a { min-height: 44px; }
  input, textarea { font-size: 16px; min-height: 44px; }

  /* Enhanced mobile cards and grids */
  .section {
    padding: 3rem 0;
  }
  
  .section h2 {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
  }
  
  .section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
  }
  
  .skills-grid { 
    grid-template-columns: 1fr; 
    gap: 1.2rem;
  }
  
  .skill-card {
    padding: 1.2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(23, 245, 151, 0.08), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(23, 245, 151, 0.3);
    box-shadow: 0 8px 25px rgba(23, 245, 151, 0.1);
    transition: all 0.3s ease;
  }
  
  .skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(23, 245, 151, 0.2);
  }
  
  .projects-grid { 
    grid-template-columns: 1fr; 
    gap: 1.2rem;
  }
  
  .project-card {
    padding: 1.2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(23, 245, 151, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
  }
  
  .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
  }
  
  .project-media { 
    height: 140px; 
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, rgba(103, 255, 76, 0.1), rgba(0, 212, 255, 0.1));
  }
  
  .about-stats { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 0.8rem; 
    margin-top: 1.5rem;
  }
  
  .about-stats .stat {
    padding: 1rem 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(23, 245, 151, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
  }
  
  .about-cards { 
    grid-template-columns: 1fr; 
    gap: 1rem;
  }
  
  .about-cards li {
    padding: 1.2rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(103, 255, 76, 0.08), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(103, 255, 76, 0.3);
    box-shadow: 0 8px 25px rgba(103, 255, 76, 0.1);
    transition: all 0.3s ease;
  }
  
  .about-cards li:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(103, 255, 76, 0.2);
  }

  /* Enhanced mobile contact form */
  .contact-grid {
    gap: 2rem;
  }
  
  .contact-card {
    padding: 1.5rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(23, 245, 151, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
  }
  
  .contact-aside {
    padding: 1.5rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(103, 255, 76, 0.08), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(103, 255, 76, 0.3);
    box-shadow: 0 10px 30px rgba(103, 255, 76, 0.1);
  }
  
  .field-row { 
    grid-template-columns: 1fr; 
    gap: 1rem;
  }
  
  .field {
    margin-bottom: 1.2rem;
  }
  
  input, textarea {
    padding: 1rem;
    border-radius: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 16px;
    transition: all 0.3s ease;
  }
  
  input:focus, textarea:focus {
    border-color: var(--primary);
    background: rgba(23, 245, 151, 0.05);
    box-shadow: 0 0 0 3px rgba(23, 245, 151, 0.2);
    transform: translateY(-2px);
  }
  
  .contact-item {
    padding: 1rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }
  
  .contact-item:hover {
    background: rgba(23, 245, 151, 0.05);
    border-color: rgba(23, 245, 151, 0.3);
    transform: translateX(5px);
  }

  /* Footer */
  .footer-grid { gap: 1.4rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .6rem; }

  /* Misc visuals */
  .float-icons { opacity: .12; }
  .progress-bar { height: 3px; }
}

@media (max-width: 380px) {
  /* Enhanced very small devices experience */
  .container { padding: 0 0.75rem; }
  
  .hero {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
  
  .hex-card { 
    width: min(95vw, 260px); 
    animation: mobile-float-small 3s ease-in-out infinite;
  }
  
  @keyframes mobile-float-small {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.01); }
  }
  
  .hero-title { 
    font-size: clamp(1.6rem, 8vw, 2.2rem);
    line-height: 1.1;
  }
  
  .subtitle.big { 
    font-size: clamp(0.9rem, 5vw, 1.1rem);
    margin-bottom: 0.8rem;
  }
  
  .hero-copy { 
    font-size: 0.9rem; 
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }
  
  .btn { 
    padding: 0.7rem 1rem; 
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .btn-small { 
    padding: 0.5rem 0.7rem; 
    font-size: 0.85rem;
  }
  
  .contact-item { 
    grid-template-columns: 32px 1fr; 
    padding: 0.8rem;
  }
  
  .section { 
    padding: 2.5rem 0; 
  }
  
  .skill-card,
  .project-card,
  .about-cards li {
    padding: 1rem;
  }
  
  .about-stats {
    gap: 0.6rem;
  }
  
  .about-stats .stat {
    padding: 0.8rem 0.4rem;
  }
}

/*
  Explicit responsive breakpoints
  - Mobile: max-width 480px
  - Tablet: 481px–768px
  - Small laptops: 769px–1024px
  - Desktop: 1025px+
*/

/* Mobile (<=480px): tighten spacing/typography a bit more than 520px rules where helpful */
@media (max-width: 480px) {
  .section { padding: 2.8rem 0; }
  .hero { padding-top: 4.5rem; }
  .subtitle.big { font-size: .98rem; }
  .icon { width: 34px; height: 34px; }
  .project-media { height: 110px; }
}

/* Tablet (481px–768px): two-column capable grids and balanced paddings */
@media (min-width: 481px) and (max-width: 768px) {
  .container { width: min(1100px, 94%); }
  .section { padding: 3.6rem 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.2rem; }
  /* Tablet header spacing */
  .nav { height: 64px; }
  .site-nav { top: 64px; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* Small laptops (769px–1024px): introduce comfortable two-column hero/about grids */
@media (min-width: 769px) and (max-width: 1024px) {
  .container { width: min(1200px, 92%); }
  .section { padding: 4.4rem 0; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 2.4rem; }
  .grid.two { grid-template-columns: 1.1fr .9fr; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop (>=1025px): slightly larger paddings and card media heights */
@media (min-width: 1025px) {
  .section { padding: 5rem 0; }
  .project-media { height: 160px; }
}

/* Footer styling */
.made { 
  display: flex; 
  align-items: center; 
  gap: .3rem; 
  font-size: .9rem; 
  color: var(--text-muted); 
}
.heart { 
  color: #ff6b6b; 
  animation: heartbeat 2s ease-in-out infinite; 
}
.sig { 
  font-weight: 600; 
  color: var(--primary); 
}
.version {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  background: rgba(23, 245, 151, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(23, 245, 151, 0.2);
  margin-left: 0.5rem;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}