/* ============================================
   RITHESH GOWDA C — PORTFOLIO  |  style.css
   Clean Dark Theme, Minimal, Structured
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080810;
    --bg-alt: #0d0d1a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #6366f1;
    --accent-2: #818cf8;
    --gradient: linear-gradient(135deg, #6366f1, #a78bfa);
    --text: #f0f0ff;
    --text-muted: #8888aa;
    --font: 'Inter', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --transition: 0.25s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==== NAVBAR ==== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    padding: 0 2rem;
    background: rgba(8, 8, 16, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    transition: all var(--transition);
}

#navbar.scrolled {
    background: rgba(8, 8, 16, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo — plain text, no code brackets */
.logo {
    font-family: var(--font);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.3px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.05rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.nav-github-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.83rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all var(--transition);
    margin-left: 0.5rem;
}

.nav-github-btn:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==== SECTIONS ==== */
.section {
    padding: 90px 2rem;
}

.alt-section {
    background: var(--bg-alt);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 0.25rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==== BUTTONS ==== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ==== HERO ==== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 64px;
}

.hero-content {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-2);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero-role {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 1.25rem;
    font-family: var(--mono);
}

.hero-desc {
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.8;
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-socials {
    display: flex;
    gap: 0.65rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Photo — SQUARE */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-wrapper {
    position: relative;
    display: inline-block;
}

.hero-photo {
    width: 320px;
    height: 320px;
    border-radius: 16px;
    /* square with slight rounding */
    object-fit: cover;
    object-position: top;
    border: 3px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.25), 0 20px 60px rgba(0, 0, 0, 0.4);
    display: block;
    position: relative;
    z-index: 2;
}

.photo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    height: 340px;
    border-radius: 18px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4
    }

    50% {
        opacity: 1
    }
}

/* ==== ABOUT ==== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color var(--transition);
}

.about-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.about-card-wide {
    grid-column: 1 / -1;
}

.about-card h3 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-2);
    margin-bottom: 0.85rem;
}

.about-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

.edu-degree {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.edu-college {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.edu-year {
    color: var(--accent-2);
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-val {
    font-size: 0.9rem;
    font-weight: 600;
}

.info-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-2);
    text-decoration: none;
}

.info-link:hover {
    text-decoration: underline;
}

/* ==== SKILLS (no emojis) ==== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.skill-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-3px);
}

.skill-card h3 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-2);
    margin-bottom: 1rem;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.28rem 0.75rem;
    border-radius: 6px;
}

/* ==== TIMELINE / EXPERIENCE ==== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    padding-left: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
}

.timeline-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-alt);
    flex-shrink: 0;
    margin-top: 5px;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    flex: 1;
    transition: border-color var(--transition);
}

.timeline-content:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
}

.timeline-company {
    color: var(--accent-2);
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.timeline-period {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent-2);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 6px;
    white-space: nowrap;
}

.timeline-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.timeline-points li {
    color: var(--text-muted);
    font-size: 0.88rem;
    padding-left: 1rem;
    position: relative;
}

.timeline-points li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.78rem;
}

/* ==== PROJECTS ==== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.project-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.project-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
}

.project-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.project-link:hover {
    color: var(--accent);
}

.project-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
}

.projects-footer {
    text-align: center;
}

/* ==== CERTIFICATIONS ==== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.cert-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-3px);
}

.cert-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: white;
    background: var(--gradient);
    padding: 0.22rem 0.7rem;
    border-radius: 5px;
    margin-bottom: 0.75rem;
}

.cert-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.cert-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ==== RESUME SECTION ==== */
.resume-section {
    max-width: 780px;
    margin: 0 auto;
}

.resume-preview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.resume-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.resume-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.resume-text p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.resume-subtitle {
    font-size: 0.8rem !important;
}

.resume-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.resume-btn {
    min-width: 180px;
    justify-content: center;
}

.resume-highlights {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.resume-highlight-item {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.resume-highlight-item strong {
    color: var(--accent-2);
    font-weight: 600;
}

/* ==== CONTACT ==== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.contact-info>p {
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    transition: all var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-icon {
    color: var(--accent-2);
    flex-shrink: 0;
}

.contact-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-val {
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

/* Contact form */
.contact-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-success {
    display: none;
    text-align: center;
    color: #10b981;
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.form-success.show {
    display: block;
}

/* ==== FOOTER ==== */
.footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border);
    padding: 2.5rem;
    text-align: center;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer p strong {
    color: var(--text);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.83rem;
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-copy {
    font-size: 0.76rem;
    color: #555570;
    margin-top: 0.5rem;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 100;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--accent);
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-2);
    transform: translateY(-2px);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
    .cert-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-desc {
        margin: 0 auto 2rem;
    }

    .hero-cta,
    .hero-socials {
        justify-content: center;
    }

    .hero-right {
        order: -1;
    }

    .hero-photo {
        width: 220px;
        height: 220px;
        border-radius: 12px;
    }

    .photo-glow {
        width: 240px;
        height: 240px;
        border-radius: 14px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card-wide {
        grid-column: 1;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 60px 1.25rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .resume-preview {
        flex-direction: column;
        text-align: center;
    }

    .resume-actions {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0.25rem;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(8, 8, 16, 0.98);
        backdrop-filter: blur(16px);
        padding: 1.25rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}