/* ===================================================
   COMPLETE style.css
   - Lexend Deca loaded from HTML (weights included there)
   - Sticky nav, decorative plexus canvas behind content
   - Translucent profile panel, bordered circular profile pic
   - Responsive behavior: mobile (<=480), tablet (<=768), fluid mid-range (769-1279), large screens
   =================================================== */

/* BASE */
:root {
    --nav-height: 62px;
    --nav-offset-extra: 8px;
}

html {
    scroll-padding-top: calc(var(--nav-height) + var(--nav-offset-extra));
}

#about,
#about_me .about-panel,
#work .work-panel,
#projects .projects-container,
#contact {
    scroll-margin-top: calc(var(--nav-height) + var(--nav-offset-extra));
}

.anchor-offset {
    position: relative;
}

.anchor-offset::before {
    content: "";
    display: block;
    height: calc(var(--nav-height) + var(--nav-offset-extra));
    margin-top: calc(-1 * (var(--nav-height) + var(--nav-offset-extra)));
    pointer-events: none;
    visibility: hidden;
}

* {
    box-sizing: border-box;
    font-family: "Lexend Deca", sans-serif;
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* decorative canvas behind everything */
#plexus {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* behind everything */
    pointer-events: none;
}

/* Skip link (hidden but visible on keyboard focus) */
.skip {
    position: absolute;
    left: -9999px;
    top: auto;
}

.skip:focus {
    left: 16px;
    top: 12px;
    background: rgba(255, 255, 255, 0.98);
    color: #000;
    padding: 8px 12px;
    z-index: 2000;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Page background art */
body {
    background: url('images/New Project.png') center/cover no-repeat;
    background-attachment: fixed;
}

/* MAIN layout */
main {
    display: block;
    /* we manage inner layout per-section */
    width: 100%;
}

nav {
    background-color: rgba(199, 194, 194, 0.452);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    display:flex;
}

#fi {
    width:15%;
}

nav ul {
    width: 100%;
    list-style: none;
    display:flex;
    justify-content: flex-end;
    align-items: center;
    padding-left:0;
    margin:0;
}

nav li {
    height:50px;

}
nav a {
    height:100%;
    padding: 0 15px;
    text-decoration: none;
    display:flex;
    align-items:center;
    color:rgb(37, 37, 37);
}

nav a:hover{
    background-color: rgba(146, 142, 142, 0.452);;
}

nav li:first-child {
    margin-right: auto;
    font-weight:900;
    font-size:2rem;
}

.sidebar {
    position:fixed;
    top:0;
    right:0;
    height:100vh;
    width:250px;
    z-index:999;
    background-color: rgba(255, 255, 255, 0.048);
    backdrop-filter: blur(10px);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    display:none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li {
    width:100%;
    display:flex;
    justify-content: flex-end;
    padding: 10px 30px 10px 0;
    margin-top:10px;
}
.sidebar a {
    width:100;
}
#fi2 {
    height:90%;
}

#fi2cont {
    display:flex;
    justify-content: space-between;
}

.menu-button {
    display: none;
}

#navbar {
    backdrop-filter: blur(2px);
}

/* ABOUT section - outer container */
#about {
    display: flex;
    justify-content: center;
    /* horizontally center the block */
    width: 100%;
    box-sizing: border-box;
    padding: clamp(4vh, 6vw, 7vh) 4vw;
    /* vertical breathing and side padding */
}

/* inner card that contains pic + text */
#nameshantanu {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 3.2vw, 80px);
    width: min(1600px, 94%);
    /* allow growth on large screens */
    margin: 0 auto;
    padding: clamp(16px, 2vw, 40px);
    box-sizing: border-box;
}

/* PROFILE PIC - 1.5x sized, responsive and decorative */
#propic {
    width: clamp(240px, 20vw, 720px);
    height: auto;
    aspect-ratio: 1/1;
    background: url("images/8.png") center/cover no-repeat;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
    border: clamp(6px, 0.9vw, 22px) solid rgba(255, 255, 255, 0.95);
    display: block;
}

/* TEXT PANEL */
#shantanu {
    margin: 0;
    padding: clamp(12px, 1.6vw, 28px);
    flex: 1 1 0;
    min-width: 220px;
    box-sizing: border-box;
    text-align: left;
    background: rgba(255, 255, 255, 0.65);
    border-radius: clamp(12px, 2.4vw, 48px);
    backdrop-filter: blur(2px);
    color: #111;
}

/* Headline and tagline */
#shantanu>h1 {
    font-size: clamp(40px, 6.5vw, 120px);
    margin: 0 0 12px 0;
    line-height: 1.02;
    word-break: keep-all;
    hyphens: none;
    white-space: nowrap;
    /* prefer single-line; will scale down via clamp */
    overflow: visible;
}

#shantanu>p {
    font-size: clamp(1rem, 1.6vw, 1.9rem);
    margin: 0;
    font-style: italic;
    color: #222;
}

.about-panel {
    margin: 40px auto;
    padding: clamp(12px, 1.6vw, 28px);
    max-width: 820px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: rgba(255, 255, 255, 0.65);
    border-radius: clamp(12px, 2.4vw, 48px);
    backdrop-filter: blur(2px);
    color: #111;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

/* Heading inside panel */
.about-panel>h1 {
    font-size: clamp(32px, 5vw, 60px);
    margin: 0 0 20px 0;
    line-height: 1.1;
}

/* Paragraph inside panel */
.about-panel>p {
    font-size: clamp(1rem, 1.6vw, 1.4rem);
    margin: 0;
    font-style: italic;
    color: #222;
    line-height: 1.6;
}

/* About Me panel */
#about_me .about-panel {
    margin: 0 auto 40px auto;
    /* no top margin, only bottom */
    padding: clamp(24px, 3vw, 48px);
    /* more internal breathing room */
    max-width: 960px;
    /* slightly wider than #shantanu */
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: rgba(255, 255, 255, 0.7);
    border-radius: clamp(16px, 2.8vw, 52px);
    backdrop-filter: blur(2px);
    color: #111;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
    position: relative;
    top: -40px;
    /* pulls the whole block upward */
}

/* About Me panel - pushed higher and more prominent */
#about_me .about-panel {
    margin: 0 auto 40px auto;
    /* no top margin, only bottom */
    padding: clamp(24px, 3vw, 48px);
    /* more internal breathing room */
    max-width: 960px;
    /* slightly wider than #shantanu */
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: rgba(255, 255, 255, 0.7);
    border-radius: clamp(16px, 2.8vw, 52px);
    backdrop-filter: blur(2px);
    color: #111;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.301);
    position: relative;
    top: -40px;
    /* pulls the whole block upward */
}

/* Heading: larger and centered */
#about_me .about-panel>h1 {
    font-size: clamp(36px, 5.5vw, 72px);
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-align: center;
}

/* Paragraph: keep it readable */
#about_me .about-panel>p {
    font-size: clamp(1.05rem, 1.7vw, 1.5rem);
    margin: 0;
    line-height: 1.65;
    color: #222;
}

/* intro */
#work .work-intro {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 2.2rem auto;
}

#work .work-intro h1 {
    margin: 0 0 0.6rem 0;
    font-size: clamp(28px, 4.2vw, 44px);
    line-height: 1.06;
}

#work .work-intro .work-sub {
    margin: 0 auto;
    color: #222;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    max-width: 820px;
    opacity: 0.95;
}

/* cards container */
.work-cards {
    display: flex;
    gap: clamp(18px, 3vw, 28px);
    justify-content: center;
    align-items: stretch;
    width: min(1400px, 94%);
    margin: 0 auto;
}

/* individual card */
.work-card {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 14px;
    padding: clamp(18px, 2.2vw, 28px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    flex: 1 1 0;
    /* flexible equal-width columns */
    min-width: 220px;
    max-width: 420px;
    /* prevents excessively wide cards */
    box-sizing: border-box;
    transition: transform .2s ease, box-shadow .2s ease;
}

/* card hover subtle lift */
.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* card heading and text */
.work-card h3 {
    margin: 0 0 10px 0;
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.05;
}

.work-card p {
    margin: 0;
    color: #222;
    font-size: clamp(.95rem, 1.3vw, 1.05rem);
    line-height: 1.6;
}

/* tagline centered under cards */
.work-tagline {
    text-align: center;
    margin-top: 2.2rem;
}

.work-tagline p {
    margin: 0;
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: #111;
}

#work {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    box-sizing: border-box;
    /* breathing room */
    display: block;
    position: relative;
    top: -10px;
}

#work .work-panel {
    width: 100%;
    max-width: none;
    /* remove the centered limit */
    background: rgba(255, 255, 255, 0.75);
    border-radius: 0;
    /* no rounded corners, full bar look */
    backdrop-filter: blur(4px);
    padding: clamp(28px, 4vw, 60px);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    /* subtle divider feel */
    text-align: center;
    position: relative;
    top: -32px;
    /* pulls the whole block higher */
}

/* heading + subtext */
#work .work-panel h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4.8vw, 52px);
    line-height: 1.06;
    text-align: center;
}

#work .work-sub {
    margin: 0 auto 22px auto;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: #222;
    max-width: 900px;
}

/* inner sections */
.work-sections {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(24px, 3vw, 48px);
    margin: 0 auto 24px auto;
    max-width: 1400px;
    /* content stays readable even on huge screens */
    padding: 0 4vw;
}

.icon {
    width: 60%;
    height: auto;
    color: #111;
}

.icon {
    width: 68%;
    height: 68%;
}

.icon-wrap {
    width: clamp(64px, 8vw, 110px);
    height: clamp(64px, 8vw, 110px);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0);
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.06);
}

.icon-wrap {
    width: clamp(64px, 8vw, 110px);
    height: clamp(64px, 8vw, 110px);
}

.work-item {
    flex: 1 1 0;
    min-width: 200px;
    max-width: 360px;
    text-align: center;
    /* center everything inside each item */
    box-sizing: border-box;
    padding: clamp(8px, 1.4vw, 18px);
}

.work-item h3 {
    margin: 6px 0 10px;
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.05;
}

.work-item p {
    margin: 0;
    font-size: clamp(.95rem, 1.2vw, 1.05rem);
    line-height: 1.55;
    color: #222;
}

.work-tagline {
    margin-top: 20px;
    text-align: center;
}

.work-tagline p {
    margin: 0;
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.work-sections section {
    flex: 1 1 0;
    min-width: 220px;
}

.work-sections h3 {
    margin: 0 0 10px 0;
    font-size: clamp(18px, 2.2vw, 24px);
}

.work-sections p {
    margin: 0;
    font-size: clamp(.95rem, 1.3vw, 1.1rem);
    line-height: 1.6;
    color: #222;
}

/* tagline */
.work-tagline {
    margin-top: 20px;
}

.work-tagline p {
    margin: 0;
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
}

/* -------- Projects section -------- */
#projects {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(3vh, 4vw, 6vh) 0;
    /* space around the section */
    box-sizing: border-box;
}

/* transparent outer container (content centered inside) */
.projects-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* as requested: ~60% of viewport on desktop */
    max-width: 1200px;
    min-width: 760px;
    /* prevents container from collapsing on medium screens */
    box-sizing: border-box;
    background: transparent;
    /* fully transparent container */
    text-align: center;
    margin: 0 auto;
}

/* heading */
.projects-container>h1 {
    margin: 0 0 18px 0;
    font-size: clamp(26px, 3.6vw, 40px);
    line-height: 1.05;
}

/* grid of cards: 3 columns x 2 rows */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2vw, 36px);
    justify-content: center;
    justify-items: center;
    width: 60vw;
    max-width: 1200px;
    /* center the fixed-size cards inside each grid cell */
    margin: 0 auto;
}

/* each card - fixed size */
.proj-card {
    display: block;
    width: 320px;
    height: 520px;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    transform: translateZ(0) scale(1);
    transform-origin: center center;
    transition: transform .18s cubic-bezier(.2, .9, .25, 1), box-shadow .18s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.836);
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    will-change: transform, box-shadow;
}

/* tiny top spacer */
.proj-topspace {
    height: 8px;
    width: 100%;
}

/* image area: maintain 5:7 aspect ratio, centered and cover */
.proj-image {
    width: 90%;
    /* image takes 90% of card width */
    aspect-ratio: 5 / 7;
    /* enforces 5:7 ratio */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08) inset;
    margin-bottom: 12px;
}

/* body area (title + description) */
.proj-body {
    width: 90%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* center content horizontally */
    justify-content: flex-start;
    gap: 10px;
    /* allow body to expand/shrink to fill the space left by image */
    flex: 1 1 auto;
    padding: 0 0 8px 0;
}

/* title */
.proj-body h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    text-align: center;
    flex: 0 0 auto;
    /* don't let heading stretch */
}

/* description area: fixed height, clip overflow */
.proj-desc {
    margin: 0;
    color: #222;
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
    /* important: allow description to grow to fill available vertical space */
    flex: 1 1 auto;
    min-height: 0;
    /* allows flex children to shrink properly in some browsers */
    overflow: auto;
    /* scroll if content exceeds the area */
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    /* small breathing room for scrollbars */
}



/* hover: enlarge slightly (image + text included) */
.proj-card:hover {
    transform: translateY(-6px) scale(1.035);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

/* click/active/focus effect */
.proj-card:active {
    transform: translateY(0) scale(.985);
    /* pressed in */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    transition: transform .08s ease;
    /* snappier down */
}

/* keyboard focus accessibility */
.proj-card:focus {
    outline: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16), 0 0 0 4px rgba(0, 120, 255, 0.08);
    transform: translateY(-4px) scale(1.01);
}

.proj-card.pressed {
    transform: translateY(0) scale(.985) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12) !important;
    transition: transform .06s ease !important;
}

.proj-image {
    width: 90%;
    aspect-ratio: 7 / 5;
    /* <-- important change */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08) inset;
    margin-bottom: 12px;
}

/* footer text */
.projects-footer {
    margin-top: 16px;
    color: #222;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.712);
    padding: 0 2vh 0 2vh;
    border-radius: 20px;
}

.projects-footer p {
    margin: 6px 0;
}

/* hover only when NOT pressed */
.proj-card:not(.pressed):hover {
    transform: translateY(-6px) scale(1.035);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

/* pressed effect (mouse/touch or keyboard simulated) */
.proj-card:active,
.proj-card.pressed {
    transform: translateY(0) scale(.985);
    /* pressed in */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    transition: transform .06s ease;
}

/* keep a clean focus visual but allow hover to have priority when present */
.proj-card:focus-visible {
    outline: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16), 0 0 0 6px rgba(0, 120, 255, 0.08);
    transform: translateY(-4px) scale(1.01);
}

/* ensure image scales with hover & pressed states */
.proj-card:not(.pressed):hover .proj-image {
    transform: scale(1.035);
}

.proj-card:active .proj-image,
.proj-card.pressed .proj-image {
    transform: scale(.99);
}

.proj-card.no-hover:hover {
    transform: scale(1) translateY(0) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10) !important;
}

.proj-card.no-hover:hover .proj-image {
    transform: scale(1) !important;
}

#contact {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(4vh, 6vw, 7vh) 4vw;
    box-sizing: border-box;
}

.contact-panel {
    width: 100%;
    max-width: 920px;
    background: rgba(255, 255, 255, 0.78);
    padding: clamp(18px, 3.2vw, 40px);
    border-radius: clamp(12px, 2vw, 28px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
    text-align: left;
    box-sizing: border-box;
}

.contact-panel h2 {
    margin: 0 0 8px 0;
    font-size: clamp(24px, 3.2vw, 36px);
}

.contact-sub {
    margin: 0 0 18px 0;
    font-style: italic;
    color: #222;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

/* form layout */
#contact-form {
    width: 100%;
    display: block;
}

.row {
    margin-bottom: 14px;
}

/* two-up grid for name + email */
.two-up {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

/* make every label behave like a block container so clicking placeholder focuses input */
#contact-form label {
    display: block;
    width: 100%;
}

/* inputs + textarea styling */
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    resize: vertical;
    min-height: 44px;
    transition: box-shadow .12s ease, transform .08s ease;
}

/* larger textarea baseline */
#contact-form textarea {
    min-height: 140px;
    line-height: 1.45;
}

/* focus styles (accessible) */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    box-shadow: 0 8px 24px rgba(0, 120, 255, 0.06);
    border-color: rgba(0, 120, 255, 0.28);
    transform: translateY(-1px);
}

/* submit button */
#contact-form .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

#contact-form button[type="submit"] {
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

#contact-form .form-actions {
    display: flex;
    justify-content: center;
    /* centered on wide screens too */
    margin-top: 6px;
}

/* make meta text small and unobtrusive */
.field-meta {
    margin-top: 6px;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.55);
}

/* keep full-width button for small screens, decent-sized on large */
#contact-form button[type="submit"] {
    cursor: pointer;
    padding: 10px 22px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    min-width: 160px;
}

.contact-divider {
    margin: 2.2rem auto;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    max-width: 700px;
}

.contact-social {
    text-align: center;
    padding: 0 1rem;
}

.contact-social h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    margin-bottom: 1rem;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 1.2rem;
}

.social-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.social-links li a:hover,
.social-links li a:focus {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.social-links li a {
    text-decoration: none;
    /* stop underline on icons */
    color: #fff;
    /* ensure consistent white text/icon */
}

.social-links li a i {
    text-decoration: none;
    /* double protection */
    line-height: 1;
    /* keep icon centered */
}

#site-footer {
    background: #0b0b0b;
    color: #e9e9e9;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.92rem;
    line-height: 1;
}

/* Left copyright */
.footer-copy {
    margin: 0;
    color: #bdbdbd;
    white-space: nowrap;
}

/* Right "Go to top" */
.back-to-top {
    color: #e9e9e9;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .16s ease, transform .12s ease;
    background: rgba(255, 255, 255, 0.03);
}

.back-to-top:hover,
.back-to-top:focus {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    color: #fff;
}


/* small/mobile: button full width */
@media (max-width: 480px) {
    #contact-form .form-actions {
        justify-content: center;
    }

    #contact-form button[type="submit"] {
        width: 100%;
        min-width: 0;
    }
}

/* Keep small screens usable */
@media (max-width: 980px) {
    #nameshantanu {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    #shantanu {
        text-align: center;
        width: 100%;
    }

    #shantanu>h1 {
        white-space: normal;
    }

    /* allow wrap on small screens */
    .work-cards {
        flex-direction: column;
        gap: 18px;
        padding: 0 8px;
    }

    .work-card {
        max-width: 100%;
        width: 100%;
    }

    #work {
        padding-bottom: 4vh;
    }

    .work-sections {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .work-sections section {
        max-width: 100%;
    }

    #work .work-panel {
        top: -18px;
        padding: clamp(16px, 3vw, 28px);
    }

    .work-sections {
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }

    .work-item {
        max-width: 720px;
        width: 100%;
    }

    .icon-wrap {
        margin-bottom: 10px;
    }



}

/* Tablet: stack and center content; ~iPad sizes */
@media (max-width: 768px) {
    #about {
        padding-top: 10vh;
        padding-bottom: 20px;
    }

    #nameshantanu {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        position: static;
        padding: 12px;
    }

    #propic {
        width: clamp(180px, 24vw, 280px);
        height: auto;
        aspect-ratio: 1/1;
        border-width: clamp(5px, 0.9vw, 14px);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    }

    #shantanu>h1 {
        font-size: clamp(34px, 7.5vw, 48px);
        margin: 8px 0;
        white-space: normal;
    }

    #shantanu>p {
        font-size: 1.15rem;
    }
}

/* Mobile: improved sizing and less top whitespace */
@media (max-width: 480px) {
    #about {
        padding: 3.5vh 4vw;
    }

    #nameshantanu {
        gap: 12px;
        padding: 6px;
    }

    #propic {
        width: clamp(140px, 30vw, 220px);
        height: auto;
        aspect-ratio: 1/1;
        border-width: clamp(3px, 0.8vw, 8px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        margin: 0 auto;
        position: static;
    }

    #shantanu>h1 {
        font-size: clamp(24px, 8.5vw, 44px);
        margin: 6px 0;
        line-height: 1.08;
    }

    #shantanu>p {
        font-size: clamp(.95rem, 4vw, 1.1rem);
        margin: 0;
    }
}

/* Accessibility focus outlines for keyboard users */
a:focus,
button:focus {
    outline: 3px solid rgba(0, 120, 255, 0.25);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Patch: constrain text panel width on large screens and keep block centered */
#nameshantanu {
    /* keep the container centered but allow it to grow */
    width: min(1600px, 94%);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 3.2vw, 80px);
    padding: clamp(16px, 2vw, 40px);
}

/* profile pic: fixed-flex so it stays predictable */
#propic {
    flex: 0 0 auto;
    /* don't let the image shrink/grow */
    width: clamp(300px, 16.5vw, 720px);
    max-width: 48%;
    height: auto;
    aspect-ratio: 1/1;
    background: url("images/8.png") center/cover no-repeat;
}

/* text panel: constrain max width so it doesn't fill the whole row */
#shantanu {
    flex: 0 1 auto;
    /* allow shrinking, but don't force it to grow forever */
    max-width: 820px;
    /* <-- key constraint (tweak as desired) */
    width: 100%;
    min-width: 260px;
    margin: 0;
    padding: clamp(12px, 1.6vw, 28px);
    box-sizing: border-box;
}

/* Fluid mid-range: reduce pic hogging and ensure text doesn't wrap on large screens */
@media (min-width: 769px) and (max-width: 1279px) {
    #about {
        padding: clamp(6vh, 5vw, 8vh) 4vw;
    }

    #nameshantanu {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: clamp(24px, 3.5vw, 64px);
        width: min(1400px, 94%);
        margin: 0 auto;
        padding: clamp(12px, 1.6vw, 32px);
    }

    /* cap image share so text always has space */
    #propic {
        width: clamp(240px, 18vw, 540px);
        max-width: 45%;
        height: auto;
        aspect-ratio: 1/1;
    }

    #shantanu {
        flex: 1 1 0;
        min-width: 260px;
    }

    #shantanu>h1 {
        font-size: clamp(36px, 5vw, 100px);
        white-space: nowrap;
    }
}

/* Large screens: allow graceful growth, but prevent runaway wrapping */
@media (min-width: 1280px) {
    #nameshantanu {
        width: min(1600px, 94%);
        gap: clamp(28px, 3.2vw, 80px);
        padding: clamp(16px, 2vw, 40px);
    }

    #propic {
        width: clamp(300px, 16.5vw, 720px);
        max-width: 48%;
    }

    #shantanu>h1 {
        font-size: clamp(48px, 5.5vw, 140px);
        white-space: nowrap;
    }
}

/* FORCE stacking on tablet/phone — place THIS AT THE VERY END of your stylesheet */
@media (max-width: 980px) {

    /* outer about spacing */
    #about {
        padding: 6vh 4vw !important;
    }

    /* stack the inner block vertically and center */
    #nameshantanu {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 720px !important;
        margin: 0 auto !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    /* profile pic becomes part of the flow, centered */
    #propic {
        position: static !important;
        margin: 0 auto !important;
        width: clamp(180px, 24vw, 280px) !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14) !important;
    }

    /* text panel full width and centered */
    #shantanu {
        width: 100% !important;
        max-width: none !important;
        text-align: center !important;
        padding: 12px !important;
    }

    /* allow headline to wrap on small screens */
    #shantanu>h1 {
        white-space: normal !important;
        font-size: clamp(32px, 7.5vw, 48px) !important;
        margin: 8px 0 !important;
        line-height: 1.06 !important;
    }
}

@media (max-width: 1279px) {
    .projects-container {
        width: 72vw;
        min-width: 640px;
    }
}

@media (max-width: 980px) {
    .projects-container {
        width: 92vw;
        min-width: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        /* stack single column */
        gap: 18px;
    }

    .proj-card {
        margin: 0 auto;
    }

    /* center cards */
}

/* very small phones (ensure cards are still usable) */
@media (max-width: 420px) {
    .proj-card {
        width: 300px;
        height: 480px;
    }

    .proj-desc {
        height: 80px;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 80vw;
        /* more breathing room */
        max-width: 1000px;
    }
}

/* Tablets & below: 1 column */
@media (max-width: 767px) {
    .projects-grid {
        grid-template-columns: 1fr;
        width: 90%;
        max-width: 480px;
        /* keep it tight on phones */
    }
}

@media (max-width: 480px) {
    #contact-form .form-actions {
        justify-content: center;
    }

    #contact-form button[type="submit"] {
        width: 100%;
    }
}

/* Responsive stack: tablets & phones */
@media (max-width: 768px) {
    .two-up {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        padding: clamp(14px, 4vw, 22px);
        max-width: 720px;
    }

    #contact-form button[type="submit"] {
        padding: 12px 16px;
    }
}

/* small accessibility helper: visually-hidden text for screen readers */
.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

@media (max-width: 480px) {
    .social-links {
        gap: 0.8rem;
    }

    .social-links li a {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        gap: 0.6rem;
        text-align: center;
    }

    .footer-copy {
        white-space: normal;
    }
}
@media(max-width:843px) {
    .hideOnMobile {
        display:none;
    }
    .menu-button {
        display: block;
    }
}
@media(max-width:450px) {
    .sidebar{
        width:100%;
    }
    nav li:first-child {
        font-size: 24px;
        font-weight: 500;
    }
}

@media(max-width:330px) {
    nav li:first-child {
        font-size: 18px;
    }
}