/* ===================================
   SECTION-SPECIFIC STYLES
   Author: Hardik
   =================================== */

/* ===== NAVIGATION ===== */
.nav {
    position: sticky;
    top: var(--safe-top);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    z-index: var(--z-sticky);
    background: rgba(7, 7, 13, 0.8);
    margin-bottom: var(--space-md);
}

.logo {
    font-family: var(--font-mono);
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    transition: color var(--transition-base);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width var(--transition-base);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: var(--space-sm);
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 82vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) 0;
    position: relative;
}

.hero > *:not(.hero-3d) {
    position: relative;
    z-index: 1;
}

.hero-3d {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: min(46%, 460px);
    aspect-ratio: 1;
    z-index: 0;
    pointer-events: none;
}

.hero-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.hero-title {
    font-size: var(--fs-hero);
    line-height: 0.95;
    margin: var(--space-lg) 0;
    font-weight: var(--fw-black);
    letter-spacing: -3px;
}

.grad {
    background: var(--gradient-primary);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 6s linear infinite;
}

@keyframes gradient-shift {
    to {
        background-position: 300% 0;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-t);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.glitch:hover::before {
    opacity: 0.8;
    color: var(--color-accent);
    transform: translate(-3px, 2px);
    clip-path: inset(0 0 55% 0);
    animation: glitch-1 0.3s infinite;
}

.glitch:hover::after {
    opacity: 0.8;
    color: var(--color-secondary);
    transform: translate(3px, -2px);
    clip-path: inset(55% 0 0 0);
    animation: glitch-2 0.3s infinite;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(-2px, 2px); }
    50% { transform: translate(-4px, 1px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(2px, -2px); }
    50% { transform: translate(4px, -1px); }
}

/* Role Text (Typing) */
.role-text {
    font-family: var(--font-mono);
    font-size: clamp(1.125rem, 4vw, 1.75rem);
    font-weight: var(--fw-semibold);
    margin: var(--space-lg) 0;
    min-height: 2em;
    color: var(--text-primary);
}

.role-text span {
    color: var(--color-secondary);
}

.cursor-blink {
    display: inline-block;
    width: 10px;
    height: 1em;
    background: var(--color-accent);
    margin-left: 3px;
    vertical-align: -3px;
    animation: blink 0.8s infinite;
}

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

.hero-subtitle {
    max-width: 560px;
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    line-height: var(--lh-relaxed);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-2xl);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: var(--space-3xl);
    margin-top: var(--space-4xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: var(--fs-4xl);
    font-weight: var(--fw-black);
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

/* ===== STATEMENT SECTION ===== */
.statement-section {
    padding: 5rem 0 2rem;
}

.big-text {
    font-size: clamp(1.875rem, 6.4vw, 4rem);
    line-height: 1.15;
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--text-primary);
}

.big-text span {
    opacity: 0.14;
    transition: opacity var(--transition-base);
}

.big-text span.active {
    opacity: 1;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-xl);
    align-items: stretch;
}

.about-content {
    padding: var(--space-2xl);
}

.about-content p {
    font-size: var(--fs-lg);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-lg);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

/* ===== SKILLS SECTION ===== */
.orb-container {
    position: relative;
    width: min(92vw, 520px);
    height: min(92vw, 520px);
    margin: var(--space-2xl) auto 0;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.orb-container:active {
    cursor: grabbing;
}

.orb-container::before {
    content: '';
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(var(--rgb-primary), 0.24),
        transparent 66%
    );
    pointer-events: none;
}

.orb-container span {
    position: absolute;
    left: 50%;
    top: 50%;
    white-space: nowrap;
    padding: 0.4375rem 0.875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    will-change: transform, opacity;
    pointer-events: none;
}

.orb-hint {
    text-align: center;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    letter-spacing: var(--ls-wider);
    margin: var(--space-md) 0 0;
}

/* Skill Bars */
.skills-bars {
    margin-top: var(--space-4xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.skill-bar {
    margin-bottom: var(--space-xl);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.skill-name {
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.skill-percent {
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
}

.skill-progress {
    height: 8px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: var(--gradient-button);
    border-radius: var(--radius-full);
    transition: width 1s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.skill-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== PROJECTS SECTION (HORIZONTAL SCROLL) ===== */
.projects-hz {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
}

.projects-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    padding-top: 50px;
}

.projects-title-bg {
    position: absolute;
    left: 0;
    top: 50%;
    font-family: var(--font-primary);
    font-size: clamp(8.75rem, 28vw, 23.75rem);
    font-weight: var(--fw-black);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--border-color);
    white-space: nowrap;
    transform: translate(0, -50%);
    will-change: transform;
    pointer-events: none;
    letter-spacing: -8px;
}

.projects-header {
    padding: 0 max(var(--container-padding), calc(50vw - 490px));
    position: relative;
    z-index: 1;
}

.scroll-hint {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
}

.projects-track {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-xl) max(var(--container-padding), calc(50vw - 490px));
    width: max-content;
    will-change: transform;
    position: relative;
    z-index: 1;
}

.project-card {
    width: min(78vw, 400px);
    flex: none;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.project-number {
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: var(--fw-black);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--color-secondary);
    margin-bottom: var(--space-md);
}

.project-icon {
    font-size: 2.125rem;
    margin-bottom: var(--space-md);
}

.project-card h3 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-sm);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.project-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.project-tags em {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    background: rgba(var(--rgb-secondary), 0.1);
    border: 1px solid rgba(var(--rgb-secondary), 0.3);
}

.project-links {
    display: flex;
    gap: var(--space-sm);
}

.project-link {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.progress-bar-container {
    position: absolute;
    left: max(var(--container-padding), calc(50vw - 490px));
    right: max(var(--container-padding), calc(50vw - 490px));
    bottom: calc(var(--space-2xl) + var(--safe-bottom));
    height: 3px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    z-index: 1;
}

.projects-progress {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width 100ms linear;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

/* ===== TERMINAL DEMO ===== */
.terminal-demo {
    padding: 2.5rem 0 1.25rem;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    text-align: center;
}

.contact-content {
    padding: clamp(2rem, 5vw, 3rem) var(--space-xl);
    background: linear-gradient(
        135deg,
        rgba(var(--rgb-primary), 0.2),
        rgba(var(--rgb-accent), 0.14)
    );
}

.contact-text {
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    max-width: 480px;
    margin: 0 auto var(--space-xl);
    line-height: var(--lh-relaxed);
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: var(--space-3xl) auto 0;
    text-align: left;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: var(--space-3xl) 0 calc(var(--space-3xl) + var(--safe-bottom));
    color: var(--text-muted);
    font-size: var(--fs-sm);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.footer-social a:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-3px);
}

.footer-copyright {
    margin-top: var(--space-md);
}

/* ===== DOCK (Theme Switcher) ===== */
.dock {
    position: fixed;
    right: var(--space-md);
    bottom: calc(var(--space-md) + var(--safe-bottom));
    z-index: var(--z-overlay);
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
}

.dock button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    padding: 0;
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.dock button:hover {
    transform: scale(1.25);
    border-color: var(--color-secondary);
}

.dock button:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

.dock-terminal {
    width: auto;
    padding: 0 var(--space-md);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    background: transparent;
    border: 2px solid var(--border-color);
}

/* ===== TERMINAL OVERLAY ===== */
.terminal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 10, 3, 0.96);
    color: #39ff14;
    font-family: var(--font-mono);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    padding: calc(var(--space-lg) + var(--safe-top)) var(--space-lg) calc(var(--space-lg) + var(--safe-bottom));
    overflow: auto;
    cursor: text;
}

.terminal-overlay[hidden] {
    display: none;
}

.terminal-output {
    margin-bottom: var(--space-md);
}

.terminal-input-line {
    display: flex;
    gap: var(--space-sm);
}

.terminal-prompt {
    color: #39ff14;
    user-select: none;
}

.terminal-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: 0;
    color: inherit;
    font: inherit;
    padding: 0;
}
