/* ═══════════════════════════════════════════════════════
   Aashrit Bagareddy — Portfolio
   Theme: Dark + Cyan→Blue gradient
   ═══════════════════════════════════════════════════════ */

:root {
    --bg: #0a0a0f;
    --bg-card: #111119;
    --bg-card-hover: #16161f;
    --surface: #1a1a24;
    --border: #222233;
    --border-hover: #333355;
    --text: #e4e4ed;
    --text-muted: #8888a4;
    --text-dim: #55556a;
    --accent-1: #06b6d4;
    --accent-2: #3b82f6;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --gradient-text: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --glow: rgba(6, 182, 212, 0.15);
    --glow-strong: rgba(6, 182, 212, 0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --max-w: 1200px;
}

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

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

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

::selection {
    background: rgba(6, 182, 212, 0.3);
    color: #fff;
}

/* ── Animated Background ─────────────────────────────── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    animation: glowFloat 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 600px; height: 600px;
    background: var(--accent-1);
    top: -200px; right: -200px;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 500px; height: 500px;
    background: var(--accent-2);
    bottom: -200px; left: -200px;
    animation-delay: -10s;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Navigation ──────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 2rem;
    transition: all 0.3s var(--ease);
    backdrop-filter: blur(0px);
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--gradient);
    transition: width 0.3s var(--ease);
}

.nav-link:hover { color: var(--accent-1); }
.nav-link:hover::after { width: 100%; }

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

.nav-toggle span {
    width: 24px; height: 2px;
    background: var(--text);
    transition: all 0.3s var(--ease);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 99;
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s var(--ease);
    pointer-events: none;
}

.mobile-menu.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.mobile-link:hover { color: var(--accent-1); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero-content {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

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

.hero-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 600;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.25rem;
}

.hero-tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-socials {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
}

.social-link svg { width: 18px; height: 18px; }

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

/* ── Photo ───────────────────────────────────────────── */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.photo-frame {
    position: relative;
    width: 300px; height: 300px;
}

.photo-glow {
    position: absolute;
    inset: -20px;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(40px);
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.05); }
}

.photo-border {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--gradient);
    animation: rotateBorder 8s linear infinite;
}

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

.photo-border::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg);
}

.photo-placeholder, .photo-img {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    overflow: hidden;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-dim);
    gap: 0.5rem;
}

.photo-placeholder svg { width: 80px; height: 80px; opacity: 0.4; }
.photo-placeholder span { font-size: 0.75rem; opacity: 0.5; }

.photo-img {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    object-fit: cover;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    white-space: nowrap;
}

/* ── Scroll Indicator ────────────────────────────────── */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px; height: 60px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -60px; left: 0;
    width: 100%; height: 30px;
    background: var(--gradient);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -30px; }
    100% { top: 60px; }
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s var(--ease);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

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

.btn-ghost:hover {
    background: var(--glow);
    transform: translateY(-2px);
}

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

.btn-lg svg { flex-shrink: 0; }

/* ── Sections ────────────────────────────────────────── */
.section {
    padding: 6rem 2rem;
    position: relative;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.section-number {
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-1);
}

/* ── About ───────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.highlight-card {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.3s var(--ease);
}

.highlight-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.highlight-icon {
    width: 40px; height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--glow);
    color: var(--accent-1);
}

.highlight-icon svg { width: 20px; height: 20px; }

.highlight-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.highlight-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Timeline / Experience ───────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem; top: 1.5rem;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--gradient);
    border: 3px solid var(--bg);
    z-index: 1;
}

.timeline-card {
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.3s var(--ease);
}

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

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

.timeline-role {
    font-size: 1.15rem;
    font-weight: 700;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--accent-1);
    font-weight: 500;
}

.timeline-date {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.timeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.timeline-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
}

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-1);
}

.timeline-list strong { color: var(--text); }

/* ── Skills ──────────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-category {
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.3s var(--ease);
}

.skill-category:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.skill-category-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.skill-category-title svg {
    width: 18px; height: 18px;
    color: var(--accent-1);
}

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

.skill-tag {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.skill-tag.highlight {
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--accent-1);
    background: var(--glow);
}

.skill-category:hover .skill-tag {
    color: var(--text);
}

/* ── Projects ────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    transition: all 0.4s var(--ease);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 20px;
}

.project-card:hover {
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.1);
}

.project-card:hover::before { opacity: 0.05; }

.project-card-inner {
    position: relative;
    z-index: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

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

.project-icon svg { width: 24px; height: 24px; }

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags span {
    font-family: var(--mono);
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-dim);
}

.project-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.project-stats span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
}

.project-links { display: flex; gap: 0.75rem; }

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.project-link svg { width: 16px; height: 16px; }
.project-link:hover { color: var(--accent-1); }

/* ── Education ───────────────────────────────────────── */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.edu-card {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-align: center;
    transition: all 0.3s var(--ease);
}

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

.edu-icon {
    width: 48px; height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--glow);
    color: var(--accent-1);
}

.edu-icon svg { width: 24px; height: 24px; }

.edu-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.edu-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.edu-detail {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent-1);
    margin-top: 0.5rem;
    display: inline-block;
}

.cert-list {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cert-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1rem;
    position: relative;
}

.cert-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-1);
    font-weight: 700;
}

/* ── Contact ─────────────────────────────────────────── */
.contact-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

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

.contact-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.contact-secondary {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer strong { color: var(--text-muted); }
.footer-sub { font-size: 0.75rem; margin-top: 0.25rem; }

/* ── Reveal Animation ────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
    .hero-tagline { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-socials { justify-content: center; }
    .hero-text { order: 1; }
    .hero-visual { order: 0; }
    .about-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .edu-grid { grid-template-columns: 1fr; }
    .photo-frame { width: 250px; height: 250px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .mobile-menu.open { display: flex; }
    .hero { padding: 5rem 1.5rem 3rem; }
    .hero-name { letter-spacing: -1px; }
    .hero-tagline br { display: none; }
    .hero-stats { gap: 1.5rem; }
    .stat-number { font-size: 1.5rem; }
    .section { padding: 4rem 1.5rem; }
    .section-title { font-size: 1.5rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .timeline-header { flex-direction: column; }
    .timeline-date { align-self: flex-start; }
    .contact-title { font-size: 1.75rem; }
    .contact-secondary { flex-direction: column; align-items: center; }
    .btn-lg { padding: 0.875rem 1.5rem; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .photo-frame { width: 200px; height: 200px; }
}
