/* =========================================================
   SMART INDIA HACKATHON PORTAL
   BASE / RESET / LAYOUT / NAVBAR / FOOTER
========================================================= */

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

html{
    -webkit-text-size-adjust:100%;
    scroll-behavior:smooth;
    scroll-padding-top:calc(var(--navbar-height) + 24px);
}

body{
    font-family:var(--font-sans);
    font-size:var(--body);
    line-height:1.6;
    color:var(--text);
    background:var(--background);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    font-feature-settings:"cv02","cv03","cv04","ss01";
    overflow-x:hidden;
}

img,
svg,
video{
    display:block;
    max-width:100%;
    height:auto;
}

a{
    color:inherit;
    text-decoration:none;
    transition:color var(--transition);
}

button,
input,
select,
textarea{
    font:inherit;
    color:inherit;
}

button{
    background:none;
    border:none;
    cursor:pointer;
}

ul,
ol{
    list-style:none;
}

table{
    border-collapse:collapse;
    width:100%;
}

::selection{
    background:rgba(10,90,224,.16);
    color:var(--text-strong);
}

:focus-visible{
    outline:2px solid var(--primary);
    outline-offset:3px;
    border-radius:6px;
}

/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar{
    width:11px;
    height:11px;
}

::-webkit-scrollbar-track{
    background:var(--surface-light);
}

::-webkit-scrollbar-thumb{
    background:var(--border-strong);
    border-radius:var(--radius-pill);
    border:3px solid var(--surface-light);
}

::-webkit-scrollbar-thumb:hover{
    background:var(--text-faint);
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

h1,h2,h3,h4,h5,h6{
    font-weight:700;
    line-height:1.15;
    letter-spacing:var(--tracking-tight);
    color:var(--text-strong);
    text-wrap:balance;
}

h1{ font-size:var(--display-2); }
h2{ font-size:var(--heading-1); }
h3{ font-size:var(--heading-2); }
h4{ font-size:var(--heading-3); letter-spacing:var(--tracking-snug); }

p{
    color:var(--text-light);
    text-wrap:pretty;
}

strong{
    color:var(--text-strong);
    font-weight:650;
}

small{
    font-size:var(--caption);
    color:var(--text-muted);
}

code,
.mono{
    font-family:var(--font-mono);
    font-size:.9em;
}

/* =========================================================
   LAYOUT
========================================================= */

.container{
    width:100%;
    max-width:var(--container);
    margin-inline:auto;
    padding-inline:clamp(20px,5vw,40px);
}

section{
    position:relative;
}

.hidden{
    display:none !important;
}

/* =========================================================
   SECTION HEADINGS
========================================================= */

.section-heading{
    margin-bottom:var(--space-2xl);
    max-width:720px;
}

.section-heading.center{
    margin-inline:auto;
    text-align:center;
}

.section-heading span{
    display:inline-block;
    font-size:var(--caption);
    font-weight:700;
    letter-spacing:var(--tracking-wide);
    text-transform:uppercase;
    color:var(--primary);
    padding:6px 14px;
    border-radius:var(--radius-pill);
    background:var(--primary-light);
    margin-bottom:var(--space-sm);
}

.section-heading h2{
    font-size:var(--display-2);
    margin-bottom:var(--space-sm);
    letter-spacing:var(--tracking-tight);
}

.section-heading p{
    font-size:var(--body-lg);
    color:var(--text-muted);
    line-height:1.6;
}

.section-title{
    text-align:center;
    margin-bottom:var(--space-xl);
}

.section-title h2{
    font-size:var(--heading-1);
    margin-bottom:var(--space-xs);
}

.section-title p{
    color:var(--text-muted);
}

/* =========================================================
   BUTTONS
========================================================= */

.btn,
.primary-btn,
.primary-button,
.secondary-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    height:var(--button-height);
    padding:0 26px;
    border-radius:var(--radius-pill);
    font-size:var(--body-sm);
    font-weight:600;
    letter-spacing:-.01em;
    white-space:nowrap;
    cursor:pointer;
    border:1px solid transparent;
    transition:transform var(--transition),
               box-shadow var(--transition),
               background var(--transition),
               border-color var(--transition),
               color var(--transition);
}

.btn i,
.primary-btn i,
.primary-button i{
    font-size:.9em;
}

.btn-primary,
.primary-btn,
.primary-button{
    background:var(--primary);
    color:var(--text-invert);
    box-shadow:var(--shadow-glow);
}

.btn-primary:hover,
.primary-btn:hover,
.primary-button:hover{
    background:var(--primary-hover);
    transform:translateY(-2px);
    box-shadow:0 22px 50px -16px rgba(10,90,224,.55);
}

.btn-primary:active,
.primary-btn:active{
    transform:translateY(0);
}

.btn-secondary,
.secondary-button{
    background:var(--surface);
    color:var(--text-strong);
    border-color:var(--border-strong);
    box-shadow:var(--shadow-xs);
}

.btn-secondary:hover,
.secondary-button:hover{
    background:var(--surface-light);
    border-color:var(--text-faint);
    transform:translateY(-2px);
}

.danger-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    height:var(--button-height-sm);
    padding:0 18px;
    border-radius:var(--radius-pill);
    font-size:var(--caption);
    font-weight:600;
    background:var(--danger-light);
    color:var(--danger);
    border:1px solid rgba(198,40,40,.18);
    transition:all var(--transition);
}

.danger-btn:hover{
    background:var(--danger);
    color:var(--text-invert);
    border-color:var(--danger);
}

.small-link{
    font-size:var(--body-sm);
    font-weight:600;
    color:var(--primary);
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.small-link:hover{
    color:var(--primary-dark);
    gap:9px;
}

/* =========================================================
   NAVBAR
========================================================= */

/* White so the official government logos stay legible.
   The empty space either side carries a slow, low-contrast
   ambient treatment: drifting colour glows, a light sweep,
   and a pair of rules that emit a travelling highlight. */

.logo-strip{
    position:relative;
    overflow:hidden;
    isolation:isolate;
    padding:10px 0;
    border-bottom:1px solid var(--border);
    background:
        linear-gradient(
            90deg,
            #FF9933 0%,
            #FF9933 32%,
            #F2F4F8 50%,
            #138808 68%,
            #138808 100%) bottom / 100% 2px no-repeat,
        var(--surface);
}

/* Drifting colour glows, left and right */

.logo-strip::before,
.logo-strip::after{
    content:"";
    position:absolute;
    top:50%;
    width:360px;
    height:360px;
    border-radius:50%;
    filter:blur(64px);
    pointer-events:none;
    z-index:-1;
}

.logo-strip::before{
    left:-110px;
    background:radial-gradient(circle,rgba(10,90,224,.30),transparent 70%);
    animation:stripGlowLeft 24s ease-in-out infinite alternate;
}

.logo-strip::after{
    right:-110px;
    background:radial-gradient(circle,rgba(91,75,225,.26),transparent 70%);
    animation:stripGlowRight 29s ease-in-out infinite alternate;
}

@keyframes stripGlowLeft{
    0%{ transform:translate(0,-50%) scale(1); opacity:.55; }
    100%{ transform:translate(70px,-50%) scale(1.18); opacity:.9; }
}

@keyframes stripGlowRight{
    0%{ transform:translate(0,-50%) scale(1.14); opacity:.85; }
    100%{ transform:translate(-70px,-50%) scale(1); opacity:.5; }
}

/* Rules flanking the logos, each with a highlight that
   travels slowly outward from the centre */

/* Full-bleed: the rules run right out to both edges of the
   viewport, so the strip reads as one continuous line with
   the official logos set into the middle of it. */

.logo-strip .container{
    position:relative;
    z-index:1;
    max-width:100%;
    padding-inline:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:clamp(16px,3vw,36px);
}

.logo-strip .container::before,
.logo-strip .container::after{
    content:"";
    flex:1 1 auto;
    min-width:0;
    height:3px;
    border-radius:3px;
    background-image:
        linear-gradient(
            90deg,
            transparent,
            rgba(10,90,224,.95) 35%,
            rgba(91,75,225,.95) 65%,
            transparent),
        linear-gradient(
            90deg,
            rgba(11,17,32,.03),
            rgba(11,17,32,.16) 50%,
            rgba(11,17,32,.03));
    background-size:220px 3px,100% 2px;
    background-repeat:no-repeat;
    background-position:-240px center,0 center;
}

.logo-strip .container::before{
    animation:stripSweepLeft 15s ease-in-out infinite;
}

.logo-strip .container::after{
    animation:stripSweepRight 15s ease-in-out infinite;
}

@keyframes stripSweepLeft{
    0%,8%{ background-position:calc(100% + 240px) center,0 center; }
    72%,100%{ background-position:-240px center,0 center; }
}

@keyframes stripSweepRight{
    0%,8%{ background-position:-240px center,0 center; }
    72%,100%{ background-position:calc(100% + 240px) center,0 center; }
}

.logo-strip .navbar-brand{
    flex:0 0 auto;
}

.logo-strip img{
    height:44px;
    width:auto;
    object-fit:contain;
}

@media (max-width:560px){

    .logo-strip .container{
        gap:12px;
    }

    .logo-strip img{
        height:36px;
    }
}

@media (prefers-reduced-motion:reduce){

    .logo-strip::before,
    .logo-strip::after,
    .logo-strip .container::before,
    .logo-strip .container::after{
        animation:none;
    }
}

/* Scoped to the site bar on purpose. As a bare `header`
   selector this also caught the <header> a page uses for its
   own title block, which then stuck to the top of the viewport
   and painted over the navbar and the list below it. */

.site-header{
    position:sticky;
    top:0;
    z-index:var(--z-navbar);
}

/* Kept light on purpose: it has to stay legible whether it
   is sitting over the dark hero or a light band further
   down, and the official strip above it is white. */

.navbar{
    height:var(--navbar-height);
    background:rgba(255,255,255,.88);
    backdrop-filter:saturate(180%) blur(22px);
    -webkit-backdrop-filter:saturate(180%) blur(22px);
    border-bottom:1px solid var(--divider);
    transition:box-shadow var(--transition),background var(--transition);
}

.navbar.scrolled{
    box-shadow:var(--shadow-sm);
    background:rgba(255,255,255,.94);
}

.navbar .container{
    height:100%;
    display:flex;
    align-items:center;
    gap:var(--space-md);
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    flex-shrink:0;
}

.brand img{
    height:40px;
    width:40px;
    border-radius:50%;
    object-fit:cover;
    background:#fff;
    box-shadow:0 0 0 1px var(--border);
}

.brand-text h3{
    font-size:.95rem;
    font-weight:700;
    letter-spacing:var(--tracking-snug);
    line-height:1.2;
    color:var(--text-strong);
}

.brand-text span{
    font-size:.72rem;
    color:var(--text-muted);
    font-weight:500;
}

.nav-links{
    display:flex;
    align-items:center;
    gap:2px;
    margin-left:auto;
}

.nav-links a{
    position:relative;
    display:block;
    padding:9px 13px;
    font-size:var(--body-sm);
    font-weight:500;
    color:var(--text-light);
    border-radius:var(--radius-xs);
    transition:color var(--transition),background var(--transition);
}

.nav-links a::after{
    content:"";
    position:absolute;
    left:13px;
    right:13px;
    bottom:3px;
    height:2px;
    border-radius:2px;
    background:var(--primary);
    transform:scaleX(0);
    transition:transform var(--transition);
}

.nav-links a:hover{
    color:var(--text-strong);
    background:rgba(11,17,32,.04);
}

.nav-links a:hover::after,
.nav-links a.active::after{
    transform:scaleX(1);
}

.nav-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-left:var(--space-sm);
}

/* Mirrored into the mobile menu by main.js; hidden on desktop. */

.nav-links .mobile-actions{
    display:none;
}

.nav-actions .btn{
    height:42px;
    padding:0 20px;
    font-size:var(--caption);
}

/* Signed-in visitor's name, shown beside "My Dashboard". */

.nav-user-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    height:42px;
    padding:0 16px;
    font-size:var(--caption);
    font-weight:600;
    color:var(--text-strong);
    background:var(--primary-soft);
    border:1px solid var(--primary-light);
    border-radius:999px;
    white-space:nowrap;
}

.nav-user-chip i{
    color:var(--primary);
}

.menu-btn{
    display:none;
    width:42px;
    height:42px;
    border-radius:var(--radius-xs);
    color:var(--text-strong);
    font-size:1.1rem;
    transition:background var(--transition);
}

.menu-btn:hover{
    background:var(--surface-light);
}

/* =========================================================
   FOOTER
========================================================= */

/* Picks up exactly where the closing dark band leaves off,
   so the bottom of the page reads as one deep blue block. */

.footer{
    background:linear-gradient(180deg,#081227 0%,#060E1F 100%);
    color:var(--ink-text);
    padding:var(--space-3xl) 0 0;
    position:relative;
    overflow:hidden;
    border-top:1px solid var(--ink-line);
}

.footer::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(940px 440px at 10% 0%,rgba(37,110,255,.14),transparent 66%),
        radial-gradient(840px 420px at 90% 24%,rgba(112,84,235,.11),transparent 66%);
    pointer-events:none;
}

.footer .container{
    position:relative;
}

.footer-grid{
    display:grid;
    grid-template-columns:1.6fr 1fr 1fr 1.2fr;
    gap:var(--space-2xl);
    padding-bottom:var(--space-2xl);
}

.footer h3,
.footer h4{
    color:#fff;
    margin-bottom:var(--space-sm);
}

.footer h3{
    font-size:1.1rem;
}

.footer h4{
    font-size:.8125rem;
    text-transform:uppercase;
    letter-spacing:var(--tracking-wide);
    color:rgba(255,255,255,.55);
    font-weight:600;
}

.footer p{
    color:rgba(255,255,255,.6);
    font-size:var(--body-sm);
    line-height:1.7;
}

/* The college seal ships as a square JPEG with a baked-in
   white background, so it is clipped to a circle and given
   a ring to read as a deliberate badge on the dark footer. */

.footer img{
    height:72px;
    width:72px;
    border-radius:50%;
    object-fit:cover;
    background:#fff;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.18),
        0 0 0 6px rgba(255,255,255,.05),
        0 12px 30px -8px rgba(0,0,0,.55);
    margin-bottom:var(--space-md);
    transition:transform var(--transition),box-shadow var(--transition);
}

.footer img:hover{
    transform:translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.3),
        0 0 0 8px rgba(255,255,255,.07),
        0 16px 36px -10px rgba(0,0,0,.6);
}

.footer-links{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.footer-links a{
    color:rgba(255,255,255,.66);
    font-size:var(--body-sm);
    width:fit-content;
    transition:color var(--transition),transform var(--transition);
}

.footer-links a:hover{
    color:#fff;
    transform:translateX(3px);
}

.footer-social{
    display:flex;
    gap:10px;
    margin-top:var(--space-sm);
}

.footer-social a{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.12);
    color:rgba(255,255,255,.8);
    transition:all var(--transition);
}

.footer-social a:hover{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
    transform:translateY(-3px);
}

.footer-bottom{
    border-top:1px solid rgba(255,255,255,.1);
    padding:var(--space-md) 0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:var(--space-sm);
    flex-wrap:wrap;
    font-size:var(--caption);
    color:rgba(255,255,255,.5);
}

.footer-bottom p{
    color:rgba(255,255,255,.5);
    font-size:var(--caption);
}

/* =========================================================
   LOADER
========================================================= */

.page-loader{
    position:fixed;
    inset:0;
    background:var(--background);
    display:grid;
    place-items:center;
    z-index:var(--z-loader);
    transition:opacity .4s var(--ease),visibility .4s var(--ease);
}

.page-loader.hidden{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}

.loader-container{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:var(--space-sm);
}

.loader-circle{
    width:44px;
    height:44px;
    border:3px solid var(--border);
    border-top-color:var(--primary);
    border-radius:50%;
    animation:spin .8s linear infinite;
}

.loader-text{
    font-size:var(--caption);
    color:var(--text-muted);
    letter-spacing:var(--tracking-wide);
    text-transform:uppercase;
    font-weight:600;
}

@keyframes spin{
    to{ transform:rotate(360deg); }
}
