@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    /* Colors - Vibrant Dark Theme */
    --bg-main: #060912;
    --bg-card: rgba(17, 24, 39, 0.7);
    --accent: #6366f1;
    /* Indigo */
    --accent-secondary: #06b6d4;
    /* Cyan */
    --accent-glow: rgba(99, 102, 241, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Borders */
    --radius-lg: 16px;
    --radius-md: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    user-select: none;
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

img {
    -webkit-user-drag: none;
    /* Prevent image dragging */
    user-drag: none;
}

#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.gradient-blob {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 700;
}

.text-primary {
    color: var(--accent) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(6, 9, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 5.5rem);
    line-height: 1;
    margin-bottom: 20px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.typing-text {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--text-secondary);
    height: 1.5em;
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--border);
    transform: translateY(-2px);
}

/* Sections General */
.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Skills */
.skill-bar {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-progress {
    height: 8px;
    background: #1f2937;
    border-radius: 10px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 1.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 50px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -34px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tech-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 5px;
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.form-group {
    margin-bottom: 20px;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: white;
    outline: none;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 20px;
    border-top: 1px solid var(--border);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1001;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

/* ============================================================
   BOOTSTRAP UTILITY SHIMS
   (Bootstrap classes used in HTML without Bootstrap loaded)
   ============================================================ */
.text-center  { text-align: center; }
.list-unstyled { list-style: none; padding-left: 0; }
.fw-bold      { font-weight: 700; }
.small        { font-size: 0.875rem; }
.h5           { font-size: 1rem; }
.mt-3         { margin-top: 1rem !important; }
.mt-auto      { margin-top: auto !important; }
.mb-2         { margin-bottom: 0.5rem !important; }
.mb-3         { margin-bottom: 1rem !important; }
.me-2         { margin-right: 0.5rem; }
.g-4          { gap: 1.5rem; }
.col-md-6     { flex: 1 1 calc(50% - 0.75rem); min-width: 220px; }

/* ============================================================
   RESPONSIVE — 992 px (tablets & small desktops)
   ============================================================ */
@media (max-width: 992px) {
  .nav-links   { display: none; }
  .mobile-toggle { display: block; }
  .contact-container { grid-template-columns: 1fr; }
  .hero h1     { font-size: 3.5rem; }
  .section-title { font-size: 2.4rem; }
  .glass-card  { padding: 28px; }
}

/* ============================================================
   RESPONSIVE — 768 px (phones in landscape / small tablets)
   ============================================================ */
@media (max-width: 768px) {

  /* ── Layout ── */
  .container {
    padding: 64px 16px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  /* Reduce card padding so content doesn't overflow */
  .glass-card {
    padding: 20px;
  }

  /* ── Hero ── */
  .hero {
    padding: 0 16px;
    align-items: center;
  }

  .hero-btns {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  /* ── About – main two-column row ── */
  #about .row[style*="display: flex"] {
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Override the inline min-width: 300px on both flex children */
  #about .row[style*="display: flex"] > div {
    min-width: 0 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  /* Profile image */
  #about img {
    width: 100%;
    display: block;
    margin-bottom: 10px;
  }

  /* Skills grid – two col-md-6 blocks */
  #about .row.g-4.mb-5 {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  #about .row.g-4.mb-5 .col-md-6 {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    width: 100%;
  }

  /* Technical Skills / Recognition / Internships row */
  #about .row.g-4:not(.mb-5):not(.mt-2) {
    flex-direction: column !important;
    gap: 20px !important;
  }

  #about .row.g-4:not(.mb-5):not(.mt-2) > div {
    min-width: 0 !important;
    flex: 1 1 100% !important;
    width: 100%;
  }

  /* Education cards – 2 per row on 768 */
  .row.g-4.mt-2.reveal {
    flex-wrap: wrap !important;
  }

  .row.g-4.mt-2.reveal > div {
    flex: 1 1 calc(50% - 10px) !important;
    min-width: 140px !important;
  }

  /* ── Skill bars ── */
  .skill-bar { margin-bottom: 20px; }

  /* ── Project grid – single column ── */
  .project-grid {
    grid-template-columns: 1fr;
  }

  /* ── Timeline ── */
  .timeline { padding-left: 24px; }
  .timeline-item::after { left: -28px; }
  .timeline-item h3 { font-size: 1.05rem; }
  .timeline-item p.text-primary { font-size: 0.82rem; word-break: break-word; }
}

/* ============================================================
   RESPONSIVE — 480 px (typical portrait phones)
   ============================================================ */
@media (max-width: 480px) {

  /* ── Layout ── */
  .container { padding: 50px 14px; }

  .section-title { font-size: 1.7rem; }

  .glass-card { padding: 16px; }

  /* ── Hero ── */
  .hero h1 { font-size: 2.4rem !important; }

  /* Stack hero buttons full-width */
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
  }

  /* Hero paragraph */
  .hero .text-secondary {
    font-size: 1rem !important;
  }

  /* ── Education cards – single column ── */
  .row.g-4.mt-2.reveal > div {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }

  /* ── Section title underline stays centred ── */
  .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* ── Timeline ── */
  .timeline { padding-left: 18px; }
  .timeline-item::after { left: -22px; width: 8px; height: 8px; }
  .timeline-item h3 { font-size: 1rem; }

  /* ── Back to top ── */
  .back-to-top { bottom: 16px; right: 16px; width: 38px; height: 38px; }
}

