/* =============================================================
   Sanket Rout — portfolio
   ============================================================= */

:root {
    --bg: #ffffff;
    --bg-elev: #ffffff;
    --bg-soft: #f7f7f8;
    --text: #0e0e10;
    --text-soft: #3d3d42;
    --muted: #6a6a70;
    --faint: #9b9ba2;
    --border: #e7e7ea;
    --border-strong: #d6d6da;
    --shadow: 0 1px 2px rgba(10, 10, 12, .04), 0 10px 30px rgba(10, 10, 12, .05);
    --shadow-hover: 0 1px 2px rgba(10, 10, 12, .06), 0 16px 40px rgba(10, 10, 12, .10);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --header-bg: rgba(255, 255, 255, .72);
    --maxw: 760px;
    --t: 180ms cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
    --bg: #0b0b0c;
    --bg-elev: #141417;
    --bg-soft: #131316;
    --text: #f3f3f5;
    --text-soft: #cfcfd4;
    --muted: #9a9aa1;
    --faint: #6c6c72;
    --border: #26262b;
    --border-strong: #36363d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-hover: 0 1px 2px rgba(0, 0, 0, .6), 0 16px 40px rgba(0, 0, 0, .5);
    --header-bg: rgba(11, 11, 12, .7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-weight: 400;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--text);
    color: var(--bg);
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- icons ---- */
.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}
.icon-sm { width: 14px; height: 14px; }

/* ---- header / nav ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(170%) blur(12px);
    backdrop-filter: saturate(170%) blur(12px);
    border-bottom: 1px solid var(--border);
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
}
.logo {
    font-weight: 600;
    font-size: .98rem;
    letter-spacing: -.01em;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: .15rem;
    list-style: none;
}
.nav-link {
    text-decoration: none;
    color: var(--muted);
    font-size: .9rem;
    padding: .4rem .65rem;
    border-radius: var(--radius-sm);
    transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.active { color: var(--text); font-weight: 500; }

.nav-sep {
    width: 1px;
    height: 16px;
    margin: 0 .35rem;
    background: var(--border);
    flex-shrink: 0;
    list-style: none;
}

/* shared icon-only button (nav socials + theme toggle) */
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--t), background var(--t), border-color var(--t);
}
.icon-btn:hover {
    color: var(--text);
    background: var(--bg-soft);
    border-color: var(--border-strong);
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---- sections ---- */
section { padding: 3.25rem 0; }
section[id] { scroll-margin-top: 72px; }

.section-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.6rem;
}
.section-head .icon { color: var(--faint); }
.section-head h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.005em;
    color: var(--text);
    white-space: nowrap;
}
.section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.eyebrow {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--faint);
}

/* ---- hero ---- */
.hero { padding: 4.5rem 0 3.5rem; }
.hero .eyebrow { margin-bottom: .9rem; }
.hero h1 {
    font-size: clamp(2.1rem, 6vw, 2.7rem);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.1;
    margin-bottom: .85rem;
}
.hero .lede {
    color: var(--text-soft);
    font-size: 1.075rem;
    line-height: 1.6;
    max-width: 38rem;
    margin-bottom: 1.7rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

/* ---- buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .52rem .95rem;
    font-size: .875rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
}
.btn .icon { width: 15px; height: 15px; color: var(--muted); transition: color var(--t); }
.btn:hover { background: var(--bg-soft); border-color: var(--text-soft); transform: translateY(-1px); }
.btn:hover .icon { color: var(--text); }
.btn:active { transform: translateY(0); }

.btn-solid {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}
.btn-solid .icon { color: var(--bg); }
.btn-solid:hover { background: var(--text-soft); border-color: var(--text-soft); color: var(--bg); }
.btn-solid:hover .icon { color: var(--bg); }

/* ---- about ---- */
.about-grid {
    display: flex;
    gap: 1.8rem;
    align-items: flex-start;
}
.about-photo {
    flex-shrink: 0;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-soft);
    box-shadow: 0 0 0 1px var(--border), var(--shadow);
}
.about-body { min-width: 0; }
.about-body p { color: var(--text-soft); margin-bottom: 1rem; }
.about-body p:last-child { margin-bottom: 0; }
.about-body a,
.inline-link {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-strong);
    transition: text-decoration-color var(--t);
}
.about-body a:hover,
.inline-link:hover { text-decoration-color: var(--text); }

/* ---- skills ---- */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.skills-list span {
    font-size: .82rem;
    color: var(--muted);
    padding: .3rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elev);
    transition: color var(--t), border-color var(--t), background var(--t);
}
.skills-list span:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }

/* ---- projects ---- */
.projects-grid { display: grid; gap: 1rem; }
.project-card {
    padding: 1.3rem 1.35rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elev);
    transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.project-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}
.project-top {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
}
.project-glyph {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-soft);
}
.project-glyph .icon { width: 17px; height: 17px; }
.project-title {
    flex: 1;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.3;
}
.project-title a { color: var(--text); text-decoration: none; }
.project-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.project-arrow {
    flex-shrink: 0;
    color: var(--faint);
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity var(--t), transform var(--t), color var(--t);
}
.project-card:hover .project-arrow { opacity: 1; transform: translate(0, 0); color: var(--text); }
.project-meta {
    display: inline-block;
    font-size: .68rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--faint);
    margin-bottom: .6rem;
}
.project-card p { color: var(--text-soft); font-size: .92rem; margin-bottom: .75rem; }
.project-card p a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.project-tech { font-size: .78rem; color: var(--muted); margin-bottom: .85rem; }
.project-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.project-links a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-soft);
    padding: .32rem .62rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg);
    transition: color var(--t), border-color var(--t), background var(--t);
}
.project-links a .icon { width: 13px; height: 13px; color: var(--faint); transition: color var(--t); }
.project-links a:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }
.project-links a:hover .icon { color: var(--text); }

/* "view all" inline link */
.more-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.6rem;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
}
.more-link .icon { color: var(--muted); transition: transform var(--t), color var(--t); }
.more-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.more-link:hover .icon { transform: translateX(3px); color: var(--text); }

/* ---- page header (sub pages) ---- */
.page-header { padding: 4rem 0 1.25rem; }
.page-header .eyebrow { margin-bottom: .8rem; }
.page-header h1 {
    font-size: clamp(1.9rem, 5vw, 2.3rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: .65rem;
}
.page-header p { color: var(--text-soft); font-size: 1.02rem; max-width: 40rem; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.15rem;
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
    transition: color var(--t);
}
.back-link .icon { transition: transform var(--t); }
.back-link:hover { color: var(--text); }
.back-link:hover .icon { transform: translateX(-3px); }

/* ---- contact / links list ---- */
.link-list { list-style: none; }
.link-list li {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 0;
    border-top: 1px solid var(--border);
}
.link-list li:first-child { border-top: none; }
.link-list .li-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}
.link-list .li-icon .icon { width: 15px; height: 15px; }
.link-list .li-label {
    flex-shrink: 0;
    width: 7.5rem;
    font-size: .85rem;
    color: var(--muted);
}
.link-list .li-value {
    min-width: 0;
    font-size: .95rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-strong);
    transition: text-decoration-color var(--t);
}
.link-list a.li-value:hover { text-decoration-color: var(--text); }
.link-list .li-value.plain { text-decoration: none; color: var(--text-soft); white-space: normal; }

/* ---- footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding: 1.75rem 0 2.25rem;
}
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-row .copy { color: var(--muted); font-size: .85rem; }
.footer-socials { display: flex; gap: .3rem; }
.footer-socials a {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--faint);
    border: 1px solid transparent;
    transition: color var(--t), background var(--t), border-color var(--t);
}
.footer-socials a:hover { color: var(--text); background: var(--bg-soft); border-color: var(--border); }

/* ---- responsive ---- */
@media (max-width: 640px) {
    .container { padding: 0 1.15rem; }
    section { padding: 2.5rem 0; }
    .hero { padding: 3rem 0 2.5rem; }
    nav { gap: .5rem; }
    .nav-links { gap: 0; }
    .nav-link { padding: .4rem .5rem; }
    .about-grid { flex-direction: column; gap: 1.1rem; }
    .about-photo { width: 96px; height: 96px; }
    .link-list li { flex-wrap: wrap; gap: .45rem .8rem; }
    .link-list .li-label { width: auto; }
    .link-list .li-value { white-space: normal; }
}

@media (max-width: 540px) {
    .nav-hide-sm { display: none; }
    .nav-sep { margin: 0 .15rem; }
}

@media (max-width: 400px) {
    .logo { font-size: .9rem; }
    .nav-link { font-size: .82rem; padding: .35rem .35rem; }
    .icon-btn { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
    .btn:hover, .project-card:hover { transform: none; }
}
