/* ============================================================
   PAVAN GUNDA PORTFOLIO — Creative Redesign
   Inspired by Awwwards top portfolios: editorial type,
   grain texture, big display typography, minimal interaction
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
    /* Light mode (default) */
    --bg-color: #F0EDE6;
    --surface-color: #FAFAF5;
    --surface-hover: #E5E1D8;
    --primary-color: #E03B1F;
    --text-primary: #0D0D0D;
    --text-secondary: #6B6460;
    --text-muted: #9A9490;
    --nav-bg: rgba(240, 237, 230, 0.92);
    --border-color: rgba(0, 0, 0, 0.10);
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.07);
    --card-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.13);

    /* Fonts */
    --font-display: 'Cormorant', Georgia, serif;
    --font-body: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    /* Layout */
    --nav-height: 72px;
    --section-pad: 120px;
    --max-w: 1200px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme='dark'] {
    --bg-color: #080808;
    --surface-color: #111111;
    --surface-hover: #1C1C1C;
    --primary-color: #00E5FF;
    --text-primary: #E8E8E0;
    --text-secondary: #7A8499;
    --text-muted: #4A5568;
    --nav-bg: rgba(8, 8, 8, 0.88);
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 20px 50px rgba(0, 229, 255, 0.08);
}

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

html {
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) transparent;
}

html.lenis,
html.lenis body {
    height: auto;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ---- Typography ---- */
a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

h1,
h2,
h3 {
    font-weight: 600;
    color: var(--text-primary);
}


/* ============================================================
   NOISE OVERLAY (Awwwards grain texture trend)
   ============================================================ */
.noise-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.038;
}

[data-theme='dark'] .noise-overlay {
    opacity: 0.055;
}


/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot {
    position: fixed;
    width: 7px;
    height: 7px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: background 0.3s ease, transform 0.15s ease;
    mix-blend-mode: multiply;
}

[data-theme='dark'] .cursor-dot {
    mix-blend-mode: normal;
}

.cursor-ring {
    position: fixed;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: transform 0.12s ease, width 0.25s ease, height 0.25s ease,
        opacity 0.25s ease, border-color 0.3s ease;
    opacity: 0.6;
}

.cursor-ring.hovering {
    width: 52px;
    height: 52px;
    opacity: 0.35;
}

@media (hover: none) {

    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}


/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: height 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    height: 58px;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

[data-theme='dark'] #navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
    font-style: normal;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    transition: color 0.25s ease;
}

.nav-links a span {
    color: var(--primary-color);
    margin-right: 4px;
    font-size: 11px;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    padding: 0;
    margin-left: 8px;
    transition: var(--transition);
    line-height: 0;
}

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

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 101;
}

.menu-toggle .bar {
    width: 24px;
    height: 1.5px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.menu-toggle.toggle .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 5px);
}

.menu-toggle.toggle .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.toggle .bar:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -5px);
}


/* ============================================================
   GLOBAL LAYOUT
   ============================================================ */
main {
    padding: 0 80px;
    max-width: var(--max-w);
    margin: 0 auto;
}

/* Hero inner wrapper — mirrors main centering */
.hero-inner {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 80px 48px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

section {
    padding: var(--section-pad) 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 48px;
    gap: 16px;
}

.section-header h2 {
    font-family: var(--font-body);
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 600;
    white-space: nowrap;
}

.section-num {
    color: var(--primary-color);
    font-size: 0.85em;
    font-weight: 500;
    margin-right: 8px;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
    max-width: 320px;
}

/* Reveal animation base state */
.reveal-section {
    opacity: 0;
    transform: translateY(30px);
}


/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-height);
    overflow: hidden;
    position: relative;
}

/* Meta row (time + status) */
.hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 0 0;
    opacity: 0;
    transform: translateY(-10px);
}

.hero-time-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-time-inner {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.meta-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.live-time {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.live-date {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 2px;
}

.hero-status-block {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-location {
    color: var(--text-muted);
}

/* Giant display name */
.hero-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

.display-name {
    font-family: var(--font-display);
    font-size: clamp(80px, 14vw, 172px);
    font-weight: 300;
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    user-select: none;
}

.name-line {
    display: block;
    opacity: 0;
    transform: translateY(60px);
}

.name-italic {
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0em;
}

.hero-role-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(20px);
}

.role-text {
    font-family: var(--font-mono);
    font-size: clamp(12px, 1.4vw, 16px);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.role-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
    max-width: 420px;
}

/* Bottom row */
.hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 48px;
    gap: 32px;
    opacity: 0;
    transform: translateY(20px);
}

.hero-desc {
    font-size: clamp(13px, 1.3vw, 15px);
    color: var(--text-secondary);
    max-width: 360px;
    line-height: 1.75;
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.scroll-text {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-rl;
}

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

.scroll-line-inner {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

    50% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100%);
    }
}


/* ============================================================
   MARQUEE STRIP
   ============================================================ */
.marquee-strip {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    background: var(--surface-color);
}

.marquee-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: marquee 28s linear infinite;
    width: max-content;
}

.marquee-track span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.marquee-sep {
    color: var(--primary-color) !important;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-25%);
    }
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    padding: 12px 26px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn:hover::after {
    opacity: 0.06;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1.5px solid var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 59, 31, 0.3);
}

[data-theme='dark'] .btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.25);
}

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

.btn-outline:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 15px;
}


/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.8;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 8px 24px;
    margin-top: 24px;
}

.skills-list li {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skills-list li::before {
    content: "▹";
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Code Card */
.code-card {
    background-color: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-slow);
}

.code-card:hover {
    transform: translateY(-6px) rotate(-0.5deg);
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: var(--surface-hover);
    padding: 10px 14px;
    display: flex;
    gap: 7px;
    border-bottom: 1px solid var(--border-color);
}

.dot-red {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f56;
}

.dot-yellow {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffbd2e;
}

.dot-green {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #27c93f;
}

.card-body {
    padding: 20px;
    overflow-x: auto;
}

.card-body pre {
    font-family: 'Space Grotesk', monospace;
    font-size: 12.5px;
    line-height: 1.6;
}

/* Syntax colours */
.keyword {
    color: #c678dd;
}

.variable {
    color: #e5c07b;
}

.string {
    color: #98c379;
}

.property {
    color: #e06c75;
}

.method {
    color: #61afef;
}


/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.project-card {
    background: var(--surface-color);
    border-radius: 10px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    min-width: 0;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
    cursor: default;
}

.project-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--text-muted);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.folder-icon svg {
    width: 38px;
    height: 38px;
    color: var(--primary-color);
}

.project-links a svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.project-links a:hover svg {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.project-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    line-height: 1.4;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-tech li {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
}


/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
    text-align: center;
    align-items: center;
    padding: 160px 0;
    min-height: 80vh;
}

.contact-content {
    max-width: 700px;
}

.contact-sup {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary-color);
    display: block;
    margin-bottom: 16px;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(52px, 8vw, 96px);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 44px;
    line-height: 1.8;
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
    padding: 40px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
    max-width: var(--max-w);
    margin: 0 auto;
}

.footer-socials {
    display: flex;
    gap: 18px;
}

.footer-socials a svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-socials a:hover svg {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-name {
    color: var(--text-primary);
    font-weight: 500;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    main {
        padding: 0 48px;
    }

    footer {
        padding: 36px 48px;
    }

    .hero-inner {
        padding: 0 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 80px;
    }

    main {
        padding: 0 24px;
    }

    .hero-inner {
        padding: 0 24px;
    }

    footer {
        padding: 30px 24px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nav-content {
        padding: 0 24px;
    }

    .section-header .line {
        max-width: 120px;
    }

    /* Nav mobile */
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background: var(--surface-color);
        width: 75%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
        border-left: 1px solid var(--border-color);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links a {
        font-size: 16px;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hero mobile */
    .hero-meta {
        flex-direction: column;
        gap: 10px;
    }

    .hero-status-block {
        flex-wrap: wrap;
    }

    .display-name {
        font-size: clamp(60px, 18vw, 110px);
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .scroll-indicator {
        display: none;
    }

    .hero-role-strip .role-line {
        display: none;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Contact */
    .contact-section {
        padding: 100px 0;
    }
}

@media (max-width: 480px) {
    .display-name {
        font-size: clamp(52px, 20vw, 90px);
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        text-align: center;
        justify-content: center;
    }
}