/* ═══ Resume — Surendra Raika ═══ */

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

/* --- Dark Theme (default) --- */
:root {
    --primary: #58a6ff;
    --primary-hover: #79b8ff;
    --text: #c9d1d9;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --bg: #0d1117;
    --bg-card: #161b22;
    --border: #21262d;
    --accent: #d29922;
    --green: #3fb950;
    --purple: #bc8cff;
    --hover-bg: rgba(88, 166, 255, 0.08);
    --badge-gray-bg: #30363d;
    --badge-gray-text: #c9d1d9;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Light Theme --- */
[data-theme="light"] {
    --primary: #0969da;
    --primary-hover: #0550ae;
    --text: #1f2328;
    --text-secondary: #656d76;
    --text-muted: #8b949e;
    --bg: #ffffff;
    --bg-card: #f6f8fa;
    --border: #d0d7de;
    --accent: #9a6700;
    --green: #1a7f37;
    --purple: #8250df;
    --hover-bg: rgba(9, 105, 218, 0.06);
    --badge-gray-bg: #e1e4e8;
    --badge-gray-text: #1f2328;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Links --- */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* --- Section Heading --- */
h3 {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--primary);
}

h3 .prompt {
    color: var(--green);
    margin-right: 0.5rem;
}

/* --- Hero Header --- */
.hero {
    text-align: center;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border);
}

.hero-name {
    font-family: var(--font-sans);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.hero-title .dot {
    color: var(--primary);
    margin: 0 0.15rem;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

.hero-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.typing-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.typing-subtitle .cursor {
    display: inline-block;
    width: 7px;
    height: 0.9em;
    background-color: var(--primary);
    margin-left: 3px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

/* --- Nav --- */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.nav-bar a {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.nav-bar a:hover,
.nav-bar a.active {
    color: var(--primary);
    background-color: var(--hover-bg);
    border-color: var(--border);
}

/* --- Sections --- */
.section {
    padding: 1rem 0;
}

/* --- About --- */
.about-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.about-content p {
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.info-block {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.info-block .label {
    color: var(--text-muted);
    display: inline-block;
    min-width: 140px;
}

.info-block .value {
    color: var(--text);
}

/* --- Expertise --- */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.expertise-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: border-color 0.3s ease;
}

.expertise-card:hover {
    border-color: var(--primary);
}

.expertise-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.expertise-card .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    border-radius: 4px;
    font-weight: 500;
    color: #fff;
}

.badge-green { background-color: #238636; }
.badge-blue { background-color: #1f6feb; }
.badge-orange { background-color: #9e6a03; }
.badge-purple { background-color: #8957e5; }
.badge-red { background-color: #da3633; }
.badge-cyan { background-color: #0d6d6e; }
.badge-gray { background-color: var(--badge-gray-bg); color: var(--badge-gray-text); }

.expertise-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    margin: 1.5rem 0;
    padding: 2rem 0 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 5%, var(--border) 95%, transparent 100%);
}

.timeline-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0 0.5rem 1.5rem;
    position: relative;
    scrollbar-width: none;
}

.timeline-scroll::-webkit-scrollbar {
    display: none;
}

.timeline-item {
    min-width: 260px;
    max-width: 260px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 3px var(--bg);
}

.timeline-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.timeline-company {
    text-align: center;
    margin-bottom: 0.75rem;
}

.timeline-company h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.timeline-position {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.timeline-position h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.position-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin: 0;
}

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

.skill-category {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.skill-category h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

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

.skill-tag {
    display: inline-block;
    padding: 0.3rem 0.625rem;
    background-color: var(--bg);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background-color: var(--hover-bg);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

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

.project-card {
    padding: 1.25rem;
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.project-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-mono);
    margin-bottom: 0.125rem;
}

.project-lang {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--accent);
    margin-bottom: 0.625rem;
    font-weight: 500;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    flex-grow: 1;
}

.project-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

.project-link::after {
    content: ' \2192';
}

/* --- More Projects --- */
.more-projects {
    margin-top: 1rem;
}

.more-projects summary {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem 0;
}

.more-projects summary:hover {
    color: var(--primary);
}

.more-projects-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
}

.more-projects-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
}

.more-projects-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.more-projects-table td a {
    font-weight: 600;
}

.more-projects-table td:nth-child(2) {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.75rem;
}

/* --- Interests --- */
.interests-block {
    font-family: var(--font-mono);
    font-size: 0.7875rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre;
    overflow-x: auto;
}

/* --- Footer --- */
.footer {
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-align: center;
}

.footer .tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.social-links a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--hover-bg);
}

.social-links a svg {
    width: 14px;
    height: 14px;
}

/* --- Theme Toggle --- */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.theme-toggle .label {
    display: none;
}

@media (min-width: 600px) {
    .theme-toggle .label {
        display: inline;
    }
}

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 2.5rem 0 1.5rem;
    }

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

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

    h3 {
        font-size: 1.1rem;
        margin: 2rem 0 1.25rem;
    }

    .nav-bar {
        gap: 0.125rem;
    }

    .nav-bar a {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

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

    .timeline::before {
        display: none;
    }

    .timeline-scroll {
        flex-direction: column;
        overflow-x: visible;
        gap: 1rem;
    }

    .timeline-item {
        min-width: 100%;
        max-width: 100%;
    }

    .timeline-item::before {
        display: none;
    }

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

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

    .interests-block {
        font-size: 0.625rem;
        padding: 1rem;
    }

    .info-block .label {
        min-width: 110px;
    }
}

/* --- Responsive: Phone --- */
@media (max-width: 480px) {
    .hero-name {
        font-size: 1.75rem;
    }

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

    .social-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .interests-block {
        font-size: 0.55rem;
    }
}

/* --- Print --- */
@media print {
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    h3 {
        margin: 1.5rem 0 1rem;
        page-break-after: avoid;
    }

    .timeline-item,
    .project-card {
        page-break-inside: avoid;
    }

    .theme-toggle,
    .nav-bar {
        display: none !important;
    }

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

    .project-card:hover,
    .skill-tag:hover {
        transform: none;
    }
}
