/* ===== CSS Variables ===== */
:root {
    /* Colors - Matte Black & Polished Silver */
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f0f0f;
    --bg-tertiary: #141414;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --silver-light: #e8e8e8;
    --silver: #c0c0c0;
    --silver-dark: #808080;
    --silver-muted: #4a4a4a;

    --accent-gradient: linear-gradient(135deg, #e8e8e8 0%, #a0a0a0 50%, #c0c0c0 100%);
    --text-gradient: linear-gradient(135deg, #ffffff 0%, #c0c0c0 100%);

    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    --glow: rgba(192, 192, 192, 0.15);
    --glow-strong: rgba(192, 192, 192, 0.3);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--silver);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 1000;
}

::selection {
    background: rgba(192, 192, 192, 0.3);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

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

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition-fast);
}

.nav-logo:hover {
    filter: brightness(1.2);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--silver-dark);
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--silver-light);
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--glow-strong);
}

.btn-secondary {
    background: transparent;
    color: var(--silver);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--silver-dark);
    background: var(--bg-card);
    transform: translateY(-2px);
}

/* ===== Glassmorphic Cards ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition-smooth);
    position: relative;
}

/* Glow effect behind card on hover */
.glass-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: radial-gradient(
        ellipse at center,
        rgba(192, 192, 192, 0.15) 0%,
        rgba(192, 192, 192, 0.05) 40%,
        transparent 70%
    );
    opacity: 0;
    z-index: -1;
    transition: var(--transition-smooth);
    filter: blur(20px);
    transform: scale(1.1);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(192, 192, 192, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* ===== Section Styles ===== */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Gradient orb background */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(192, 192, 192, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(192, 192, 192, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

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

.hero-greeting {
    font-size: 1.1rem;
    color: var(--silver-dark);
    margin-bottom: 12px;
    font-weight: 400;
}

.hero-name {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--silver);
    margin-bottom: 24px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--silver-dark);
    font-style: italic;
    margin-bottom: 40px;
    max-width: 500px;
}

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

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Network Graphic */
.hero-network {
    width: 400px;
    height: 400px;
    animation: float 6s ease-in-out infinite;
}

.network-lines line {
    stroke: var(--silver-dark);
    stroke-width: 1;
    opacity: 0.3;
    transition: var(--transition-smooth);
}

.hero-network:hover .network-lines line {
    opacity: 0.5;
    stroke: var(--silver);
}

.network-nodes .node {
    fill: var(--silver-dark);
    transition: var(--transition-smooth);
}

.network-nodes .node-primary {
    fill: var(--silver);
    filter: drop-shadow(0 0 8px rgba(192, 192, 192, 0.5));
}

.network-nodes .node-small {
    fill: var(--silver-muted);
}

.hero-network:hover .network-nodes .node {
    fill: var(--silver);
}

.hero-network:hover .network-nodes .node-primary {
    fill: var(--silver-light);
    filter: drop-shadow(0 0 12px rgba(192, 192, 192, 0.7));
}

/* Pulse animation on primary nodes */
.pulse-rings .pulse {
    fill: none;
    stroke: var(--silver);
    stroke-width: 2;
    opacity: 0;
    animation: pulse 3s ease-out infinite;
}

.pulse-delay-1 {
    animation-delay: 1s !important;
}

.pulse-delay-2 {
    animation-delay: 2s !important;
}

@keyframes pulse {
    0% {
        r: 8;
        opacity: 0.6;
    }
    100% {
        r: 30;
        opacity: 0;
    }
}

/* Data flow animation along lines */
.network-lines line {
    stroke-dasharray: 5 5;
    animation: dataFlow 20s linear infinite;
}

@keyframes dataFlow {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -100;
    }
}

/* Legacy - keep for compatibility */
.hero-graphic {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(192, 192, 192, 0.08) 0%, transparent 50%);
    border: 1px solid var(--glass-border);
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero-graphic::before {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    animation: rotate 20s linear infinite;
}

.hero-graphic::after {
    content: '';
    position: absolute;
    inset: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}

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

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

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--silver-dark);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--silver);
    border-radius: 2px;
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(12px); }
}

/* ===== Vision Section ===== */
.vision {
    background: var(--bg-secondary);
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.vision-main {
    grid-column: span 2;
}

.vision-grid h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--silver-light);
    margin-bottom: 16px;
}

.vision-grid p {
    color: var(--silver-dark);
    line-height: 1.7;
}

.vision-grid p + p {
    margin-top: 12px;
}

/* ===== Resume Section ===== */
.resume-block {
    margin-bottom: 60px;
}

.resume-block-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--silver-light);
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-category h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--silver-light);
    margin-bottom: 16px;
}

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

.skill-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(192, 192, 192, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--silver);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: rgba(192, 192, 192, 0.15);
    border-color: var(--silver-dark);
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    overflow: hidden;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
}

.timeline-info {
    flex: 1;
}

.timeline-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--silver-light);
    margin-bottom: 4px;
}

.timeline-info .company {
    font-size: 0.95rem;
    color: var(--silver-dark);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--silver-dark);
    font-weight: 500;
    white-space: nowrap;
}

.expand-btn {
    background: none;
    border: none;
    color: var(--silver-dark);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.expand-btn:hover {
    color: var(--silver-light);
}

.expand-btn svg {
    transition: var(--transition-smooth);
}

.timeline-item[data-expanded="true"] .expand-btn svg {
    transform: rotate(180deg);
}

.timeline-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 0 0 0;
}

.timeline-item[data-expanded="true"] .timeline-content {
    max-height: 500px;
    padding: 20px 0 0 0;
}

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

.timeline-content li {
    position: relative;
    padding-left: 20px;
    color: var(--silver-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

/* Education Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.education-grid h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--silver-light);
    margin-bottom: 8px;
}

.education-grid p {
    color: var(--silver);
    margin-bottom: 4px;
}

.education-detail {
    font-size: 0.9rem;
    color: var(--silver-dark) !important;
}

/* Resume Download */
.resume-download {
    text-align: center;
    padding-top: 40px;
}

/* ===== GitHub Section ===== */
.github {
    background: var(--bg-secondary);
}

.github-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.github-profile {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.github-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.github-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: var(--bg-tertiary);
}

.github-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--silver-light);
    margin-bottom: 8px;
}

.github-bio {
    color: var(--silver-dark);
    margin-bottom: 12px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--silver);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.github-link:hover {
    color: var(--silver-light);
}

.github-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--silver-dark);
}

.github-repos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.repo-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.repo-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--silver-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.repo-card h4 svg {
    color: var(--silver-dark);
}

.repo-card p {
    font-size: 0.9rem;
    color: var(--silver-dark);
    flex: 1;
}

.repo-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--silver-dark);
}

.repo-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.language-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--silver);
}

/* ===== Contact Section ===== */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-card {
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--silver);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    color: var(--silver);
    transition: var(--transition-fast);
}

.contact-item:hover {
    background: var(--bg-card);
    color: var(--silver-light);
}

.contact-item svg {
    color: var(--silver-dark);
    flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer p {
    font-size: 0.9rem;
    color: var(--silver-dark);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-name {
        font-size: 3.5rem;
    }

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

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

    .hero-visual {
        order: -1;
    }

    .hero-graphic {
        width: 280px;
        height: 280px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .github-repos-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .vision-main {
        grid-column: span 1;
    }

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

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

    .glass-card {
        padding: 24px;
    }

    .github-header {
        flex-direction: column;
        text-align: center;
    }

    .github-stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .timeline-header {
        flex-wrap: wrap;
    }

    .timeline-date {
        width: 100%;
        order: -1;
        margin-bottom: 8px;
    }
}
