/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #16161a;
    --bg-card-hover: #1c1c21;
    --border: #2a2a30;
    --border-light: #3a3a42;
    --text-primary: #f0f0f2;
    --text-secondary: #a0a0ab;
    --text-muted: #6b6b76;
    --accent: #6c63ff;
    --accent-hover: #7b73ff;
    --accent-glow: rgba(108, 99, 255, 0.15);
    --gradient: linear-gradient(135deg, #6c63ff 0%, #48bfe3 100%);
    --gradient-text: linear-gradient(135deg, #6c63ff 0%, #48bfe3 50%, #72efdd 100%);
    --success: #34d399;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --container: 1200px;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Typography
   ======================================== */
.section-header {
    margin-bottom: 60px;
}

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

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(108, 99, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

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

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.nav-logo .dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: #fff;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.98);
    z-index: 999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    text-align: center;
}

.mobile-nav-links li {
    margin-bottom: 28px;
}

.mobile-nav-links a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-nav-links a:hover {
    color: var(--text-primary);
}

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -200px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(72, 191, 227, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.8vw, 2.1rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: -72px;
}

.hero-image-wrapper {
    position: relative;
    width: 360px;
    height: 360px;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 80px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.hero-image-placeholder::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--bg-primary);
}

.initials {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    animation: float 4s ease-in-out infinite;
}

.float-icon {
    font-size: 1.1rem;
}

.card-1 {
    top: 20px;
    right: -30px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 60px;
    left: -40px;
    animation-delay: 1.3s;
}

.card-3 {
    bottom: -10px;
    right: 20px;
    animation-delay: 2.6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; height: 40px; }
    50% { opacity: 0.4; height: 30px; }
}

/* ========================================
   Stats
   ======================================== */
.stats {
    padding: 80px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--border);
}

/* ========================================
   Tech Marquee
   ======================================== */
.tech-marquee {
    padding: 32px 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.marquee-track {
    overflow: hidden;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 24px;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee-item {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    transition: var(--transition);
}

.marquee-item:hover {
    color: var(--text-primary);
}

.marquee-dot {
    color: var(--accent);
    font-size: 1.2rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   About
   ======================================== */
.about {
    padding: 120px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-lead {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
}

.about-skills {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

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

.skill-tag {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ========================================
   Experience
   ======================================== */
.experience {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 900px;
}

.timeline-item {
    display: flex;
    gap: 32px;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    border: 3px solid var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.timeline-dot.active-dot {
    background: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    margin-top: 4px;
}

.timeline-content {
    padding-bottom: 48px;
    flex: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.company {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 4px;
}

.projects-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

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

.timeline-details li {
    position: relative;
    padding-left: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ========================================
   Projects
   ======================================== */
.projects {
    padding: 120px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.project-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--accent-glow);
    color: var(--accent);
}

.project-type {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.7;
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature-check {
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.project-tech span {
    padding: 6px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ========================================
   Education
   ======================================== */
.education {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
}

.edu-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.edu-year {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.edu-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.edu-school {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.edu-score {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

/* ========================================
   Contact
   ======================================== */
.contact {
    padding: 120px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 20px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

a.contact-value:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 80px 0 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    padding-bottom: 48px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 12px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

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

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

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

.back-to-top {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.back-to-top:hover {
    color: var(--accent);
}

/* ========================================
   Animations
   ======================================== */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.25s; }
.animate-in:nth-child(3) { animation-delay: 0.4s; }
.animate-in:nth-child(4) { animation-delay: 0.55s; }
.animate-in:nth-child(5) { animation-delay: 0.7s; }

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

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

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

    .hero-image-wrapper {
        width: 280px;
        height: 280px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .hero {
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .stats-grid {
        flex-wrap: wrap;
        gap: 0;
    }

    .stat-item {
        flex: 1 1 50%;
        padding: 20px 10px;
    }

    .stat-divider {
        display: none;
    }

    .timeline-header {
        flex-direction: column;
        gap: 8px;
    }

    .timeline-date {
        align-self: flex-start;
    }

    .hero-float-card {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 36px;
    }

    .footer-links {
        gap: 48px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .scroll-indicator {
        display: none;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .about,
    .experience,
    .projects,
    .education,
    .contact {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .stat-item {
        flex: 1 1 100%;
    }

    .project-card {
        padding: 24px;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    .edu-card {
        padding: 24px;
    }
}

/* ========================================
   Loading Screen
   ======================================== */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    width: 80px;
    height: 80px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Hero Grid Background
   ======================================== */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108, 99, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 99, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
    pointer-events: none;
}

/* 4th floating card */
.card-4 {
    top: -20px;
    left: 30px;
    animation-delay: 1.8s;
}

/* ========================================
   About Highlights
   ======================================== */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.highlight-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.highlight-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Featured Project Card
   ======================================== */
.project-card-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(108, 99, 255, 0.05) 100%);
    border-color: rgba(108, 99, 255, 0.2);
}

.project-card-featured:hover {
    border-color: rgba(108, 99, 255, 0.4);
}

/* Live Product */
.live-product {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.product-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(108, 99, 255, 0.08) 100%);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 48px;
    transition: var(--transition);
}

.product-card:hover {
    border-color: rgba(108, 99, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(108, 99, 255, 0.1);
}

.product-info h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.product-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 24px;
    max-width: 700px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.product-features span {
    padding: 6px 16px;
    background: var(--accent-glow);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.product-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-card-featured .project-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ========================================
   Certification
   ======================================== */
.certification {
    padding: 60px 0;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 40px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(108, 99, 255, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

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

.cert-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.cert-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cert-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Form Title
   ======================================== */
.form-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* ========================================
   Extra Responsive
   ======================================== */
@media (max-width: 768px) {
    .about-highlights {
        grid-template-columns: 1fr;
    }

    .project-card-featured .project-features {
        grid-template-columns: 1fr;
    }

    .cert-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .certification {
        padding: 40px 0;
    }
}

@media (max-width: 1024px) {
    .project-card-featured {
        grid-column: auto;
    }

    .project-card-featured .project-features {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Selection & Scrollbar
   ======================================== */
::selection {
    background: rgba(108, 99, 255, 0.3);
    color: var(--text-primary);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Smooth hover glow on hero image */
.hero-image-placeholder:hover {
    box-shadow: 0 0 120px var(--accent-glow);
}

/* Hero name */
.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 16px;
    white-space: nowrap;
    line-height: 1.1;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Photo support for hero */
.hero-image-placeholder.has-photo {
    background: none;
    box-shadow: none;
    overflow: visible;
}

.hero-image-placeholder.has-photo::before {
    display: none;
}

.hero-image-placeholder.has-photo .initials {
    display: none;
}

.hero-image-placeholder.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    display: block;
    border: 3px solid rgba(108, 99, 255, 0.4);
    box-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(72, 191, 227, 0.08);
}
