/* ==========================================
   CODE TURBULENT - MINIMAL & CLEAN PORTFOLIO
   Design System: Refined, Modern, Professional
   ========================================== */

:root {
  /* Clean Dark Palette */
  --bg-main: #0b0c10;
  --bg-surface: #12141c;
  --bg-card: #171923;
  --bg-card-hover: #1e212e;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-accent: rgba(59, 130, 246, 0.35);

  --accent-primary: #3b82f6; /* Clean Blue */
  --accent-light: #60a5fa;
  --accent-emerald: #10b981;

  --ink-primary: #f8fafc;
  --ink-secondary: #94a3b8;
  --ink-muted: #64748b;

  /* Typography */
  --font-heading: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Geometry & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);

  --max-width: 1140px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-main);
  color: var(--ink-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

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

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink-primary);
}

.section-desc {
  color: var(--ink-secondary);
  font-size: 16px;
  max-width: 640px;
  margin-bottom: 40px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--ink-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 13px;
}

/* Header & Navigation */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(11, 12, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  padding: 2px 0;
}

.logo-img {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--ink-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-light);
  font-weight: 600;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  font-size: 18px;
  padding: 5px 10px;
  cursor: pointer;
  line-height: 1;
}

.mobile-nav {
  position: fixed;
  top: 59px;
  left: 0;
  width: 100%;
  background: rgba(18, 20, 28, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-150%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.mobile-nav.open {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.mobile-nav .nav-link {
  padding: 10px 16px;
  font-size: 16px;
  width: 100%;
}

/* Hero Section */
#home {
  padding-top: 120px;
  padding-bottom: 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  max-width: 100%;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-bio {
  color: var(--ink-secondary);
  font-size: 16.5px;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-bio b {
  color: var(--ink-primary);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-primary);
}

.stat-label {
  font-size: 13px;
  color: var(--ink-muted);
}

.avatar-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  max-width: 340px;
  margin: 0 auto;
  width: 100%;
}

.avatar-img-wrapper {
  width: 100%;
  background: transparent;
  overflow: visible;
  display: flex;
  justify-content: center;
}

.avatar-img-wrapper img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.avatar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
}

.avatar-meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 500;
}

.btn-shuffle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-shuffle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink-primary);
}

/* Experience & Education */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.2s ease;
}

.timeline-card:hover {
  border-color: var(--border-hover);
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-primary);
}

.timeline-meta {
  font-size: 13.5px;
  color: var(--accent-light);
  font-weight: 500;
  margin: 4px 0 16px;
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.timeline-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-size: 16px;
}

.timeline-list b {
  color: var(--ink-primary);
}

/* Security Research Section */
.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
}

.security-card p {
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.security-card b {
  color: var(--ink-primary);
}

/* Projects Showcase */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.project-thumb {
  width: 100%;
  height: 180px;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-badge-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-category-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(11, 12, 16, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.project-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.project-desc {
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

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

.tech-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Skills Matrix */
.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.skill-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 14px;
}

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

.skill-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* About Section */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.about-card p {
  margin-bottom: 16px;
}

.about-card b {
  color: var(--ink-primary);
}

/* Footer & Socials */
#footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.social-link {
  color: var(--ink-secondary);
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  color: var(--accent-light);
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer-copy {
  margin-bottom: 6px;
}

/* Responsive Media Queries */
@media (max-width: 850px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .avatar-card {
    max-width: 280px;
  }

  .nav-menu {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 50px 0;
  }

  #home {
    padding-top: 90px;
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-bio {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    gap: 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 12px;
  }

  .timeline-card, .security-card, .about-card {
    padding: 20px;
  }

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

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

@media (max-width: 520px) {
  #header {
    padding: 12px 0;
  }

  .logo-img {
    height: 32px;
    max-width: 170px;
  }

  .header-resume-btn {
    display: none;
  }

  .mobile-nav {
    top: 54px;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}
