/* 
    Sushant Vangapandu - Portfolio
    Design System & Aesthetics
*/

:root {
    /* Color Palette - Premium Dark Mode */
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 25, 0.6);
    --bg-card-hover: rgba(30, 30, 40, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --bg-nav: rgba(10, 10, 15, 0.8);
    
    /* Theme Accents */
    --accent-primary: #06b6d4;
    --accent-secondary: #4df0ff;
    --accent-bg-subtle: rgba(6, 182, 212, 0.1);
    --accent-bg-hover: rgba(6, 182, 212, 0.2);
    --accent-shadow: rgba(6, 182, 212, 0.5);

    /* Gradients for text and accents */
    --accent-glow: rgba(6, 182, 212, 0.15);
    --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);
    
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-hover: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* Spacing & Layout */
    --nav-height: 80px;
    --container-max-width: 1100px;
    --section-padding: 100px 20px;
    --br-md: 12px;
    --br-lg: 20px;
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-med: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
:root.light-theme {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --bg-nav: rgba(255, 255, 255, 0.8);
    
    --accent-primary: #2563eb; /* Royal Blue for pristine readability */
    --accent-secondary: #1d4ed8; /* Darker Blue */
    --accent-bg-subtle: rgba(37, 99, 235, 0.1);
    --accent-bg-hover: rgba(37, 99, 235, 0.2);
    --accent-shadow: rgba(37, 99, 235, 0.5);

    --accent-glow: rgba(37, 99, 235, 0.1);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    --gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    
    --border-glass: rgba(0, 0, 0, 0.05);
    --border-glass-hover: rgba(0, 0, 0, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-bg::before, .glow-bg::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.glow-bg::before {
    background: var(--accent-primary);
    top: -20%;
    left: -10%;
}

.glow-bg::after {
    background: #a855f7;
    bottom: -20%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Typography elements */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

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

.accent-link {
    color: var(--accent-secondary);
    position: relative;
    display: inline-block;
    font-weight: 500;
}

.accent-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-secondary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.accent-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.font-mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* Components */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    max-width: var(--container-max-width);
    margin-inline: auto;
}

.section-title::after {
    content: '';
    display: block;
    height: 1px;
    flex-grow: 1;
    background: var(--border-glass-hover);
    max-width: 300px;
}

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

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--br-lg);
    padding: 2rem;
    transition: var(--transition-med);
    position: relative;
    overflow: hidden;
}

.hover-glow:hover {
    transform: translateY(-5px);
    border-color: var(--border-glass-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px -15px var(--accent-bg-hover);
}

.hover-glow:hover::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: var(--transition-med);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: transparent;
    color: var(--text-primary);
    border: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gradient-primary);
    z-index: -1;
    transition: var(--transition-med);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    background: var(--bg-dark);
    z-index: -1;
    border-radius: 6px;
    transition: var(--transition-med);
}

.btn-primary:hover::after {
    opacity: 0.8;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-bg-subtle);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.glow-btn:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.icon-link {
    display: inline-flex;
    padding: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.icon-link:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-glass);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.nav-btn) {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nav-links a:not(.nav-btn):hover {
    color: var(--accent-secondary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--accent-primary);
    background: var(--accent-bg-subtle);
}

/* Hide moon icon in dark mode (default) */
.theme-toggle .moon-icon {
    display: none;
}

/* In light mode, hide sun icon and show moon icon */
:root.light-theme .theme-toggle .sun-icon {
    display: none;
}
:root.light-theme .theme-toggle .moon-icon {
    display: block;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
}

.hero-content {
    max-width: 800px;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    letter-spacing: 1px;
}

.name {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.role {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--text-secondary);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.cursor {
    color: var(--text-primary);
    animation: blink 1s step-end infinite;
}

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

.hero-bio {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: center;
}

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

.about-visual {
    padding: 0;
    background: #0d1117;
    position: relative;
    height: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-snippet {
    padding: 1.5rem;
    color: #c9d1d9;
    line-height: 1.6;
    width: 100%;
}

.code-snippet .keyword { color: #ff7b72; }
.code-snippet .function { color: #d2a8ff; }
.code-snippet .type { color: #79c0ff; }
.code-snippet .string { color: #a5d6ff; }
.code-snippet .number { color: #79c0ff; }
.code-snippet .comment { color: #8b949e; font-style: italic; }

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: var(--accent-bg-subtle);
    color: var(--accent-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 1px solid var(--accent-bg-hover);
    transition: var(--transition-fast);
}

.skill-tags span:hover {
    background: var(--accent-bg-hover);
    transform: translateY(-2px);
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 5px;
    height: calc(100% - 10px);
    width: 2px;
    background: var(--border-glass-hover);
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 3rem;
}

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

.timeline-dot {
    position: absolute;
    left: 8px;
    top: 24px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 4px solid var(--bg-dark);
    box-shadow: 0 0 10px var(--accent-shadow);
    z-index: 2;
}

.timeline-content {
    padding: 2rem;
}

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

.timeline-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
}

.timeline-header h4 {
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.2rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    background: var(--accent-bg-subtle);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
}

.timeline-details, .timeline-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-details {
    padding-left: 1.2rem;
}

.timeline-details li {
    margin-bottom: 0.5rem;
}

.timeline-details li::marker {
    color: var(--accent-primary);
}

/* Impact Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.stat-metric {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section & Footer */
.contact {
    max-width: 600px;
    margin: 5rem auto;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

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

.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-glass);
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

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

/* Animations & Transitions */
.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Obverser Animation states */
.reveal, .fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.5, 0, 0, 1), transform 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active, .fade-up.active {
    opacity: 1;
    transform: translateY(0);
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .about-grid { grid-template-columns: 1fr; }
    
    .timeline::before { left: 0; }
    .timeline-item { padding-left: 30px; }
    .timeline-dot { left: -7px; }
    
    .section-title::after { display: none; }
}
