/*
 * style.css
 * Himanshu Dhimal - Personal Portfolio
 *
 * Design: Neobrutalist - black borders, white/yellow palette, monospace type
 * Fonts:  Space Grotesk (headings) + JetBrains Mono (body, code, labels)
 * Author: Himanshu Dhimal
 */


/* =====================================================
   1. GOOGLE FONTS
   Space Grotesk - clean geometric display font
   JetBrains Mono - developer mono for body and labels
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');


/* =====================================================
   2. DESIGN TOKENS
   All colours, fonts and sizes defined as CSS variables
   so the entire site can be adjusted from one place.
   ===================================================== */
:root {
    /* Colours */
    --black:       #000000;
    --white:       #ffffff;
    --off-white:   #f8f6f0;
    --yellow:      #f5e642;
    --grey-light:  #f0eeea;
    --grey-mid:    #888880;
    --border-col:  #000000;

    /* Typography */
    --font-head:   'Space Grotesk', sans-serif;
    --font-mono:   'JetBrains Mono', monospace;

    /* Font weights - explicitly named for clarity */
    --fw-light:    300;
    --fw-regular:  400;
    --fw-medium:   500;
    --fw-semibold: 600;
    --fw-bold:     700;

    /* Borders */
    --border:      2px solid var(--border-col);
    --border-thin: 1px solid var(--border-col);

    /* Shadows - offset, no blur, neobrutalist style */
    --shadow-sm:   3px 3px 0 var(--black);
    --shadow-md:   5px 5px 0 var(--black);
    --shadow-lg:   8px 8px 0 var(--black);

    /* Layout */
    --max-width:   1000px;
    --gap:         20px;
}


/* =====================================================
   3. RESET
   Universal selector removes default margins and sets
   consistent box model across all elements.
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* =====================================================
   4. BASE ELEMENT STYLES (Type selectors)
   Styling HTML elements directly without class names.
   ===================================================== */

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--off-white);
    color: var(--black);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: var(--fw-regular);
    font-style: normal;
    line-height: 1.7;
    /* subtle dot grid texture */
    background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
    background-size: 24px 24px;
}

h1 {
    font-family: var(--font-head);
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: var(--fw-bold);
    font-style: normal;
    line-height: 0.95;
    letter-spacing: -2px;
    text-transform: uppercase;
}

h2 {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: var(--fw-semibold);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--grey-mid);
    margin-bottom: 28px;
}

h3 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    font-style: normal;
    line-height: 1.2;
    margin-bottom: 6px;
}

h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-mid);
    margin-bottom: 4px;
}

p {
    font-weight: var(--fw-regular);
    font-style: normal;
    margin-bottom: 12px;
}

a {
    color: var(--black);
    text-decoration: none;
    font-weight: var(--fw-medium);
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    font-weight: var(--fw-regular);
}

strong {
    font-weight: var(--fw-bold);
}

em {
    font-style: italic;
    font-weight: var(--fw-light);
}

img {
    max-width: 100%;
    display: block;
}

hr {
    border: none;
    border-top: var(--border-thin);
    margin: 24px 0;
}


/* =====================================================
   5. LAYOUT UTILITIES
   Reusable layout classes used across multiple sections.
   ===================================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
}

/* Two-column grid - used in hero, about, experience */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

/* Three-column grid - used in skills, stats */
.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

/* Flex row utility */
.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}


/* =====================================================
   6. NAVIGATION
   Fixed top bar with logo left, links right.
   Links styled as bordered text buttons.
   ===================================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: var(--black);
    border-bottom: var(--border);
    padding: 0 28px;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
}

/* Logo: monospaced name abbreviation */
.nav-logo {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: var(--fw-bold);
    font-style: normal;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 12px;
    border: var(--border);
    border-color: var(--white);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-logo:hover {
    background-color: var(--yellow);
    color: var(--black);
    border-color: var(--yellow);
    text-decoration: none;
}

/* Navigation link list */
.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
}

/* Each nav link styled as a CSS button */
.nav-links a {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
    color: var(--yellow);
    text-decoration: none;
}


/* =====================================================
   7. HERO SECTION
   Full-viewport intro with name, role, photo and tags.
   ===================================================== */

.hero {
    padding-top: 100px;
    padding-bottom: 60px;
    border-bottom: var(--border);
}

/* Small label above the name */
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--grey-mid);
    margin-bottom: 16px;
}

/* Main hero grid: text left, photo right */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
    margin-bottom: 40px;
}

/* Hero name - the big h1 */
.hero-name {
    margin-bottom: 20px;
}

/* Hero subtitle line */
.hero-role {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: var(--fw-regular);
    font-style: italic;
    color: var(--grey-mid);
    margin-bottom: 28px;
    max-width: 500px;
    line-height: 1.6;
}

/* Two CTA link buttons */
.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* Solid CTA button - primary */
.btn-primary {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: var(--fw-bold);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--black);
    background-color: var(--yellow);
    text-decoration: none;
    padding: 12px 24px;
    border: var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Outline CTA button - secondary */
.btn-secondary {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--black);
    background-color: transparent;
    text-decoration: none;
    padding: 12px 24px;
    border: var(--border);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-secondary:hover {
    background-color: var(--black);
    color: var(--white);
    transform: translate(-2px, -2px);
    text-decoration: none;
}

/* Availability badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-regular);
    font-style: normal;
    color: var(--grey-mid);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Green dot indicator */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    flex-shrink: 0;
}

/* Photo frame - bordered with offset shadow */
.hero-photo-wrap {
    border: var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background-color: var(--grey-light);
}

.hero-photo-wrap img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: contrast(1.05);
}

/* Quick info bar below hero grid */
.hero-meta {
    display: flex;
    gap: 32px;
    padding-top: 24px;
    border-top: var(--border-thin);
}

.meta-item {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: var(--fw-regular);
    font-style: normal;
    color: var(--grey-mid);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.meta-item strong {
    display: block;
    color: var(--black);
    font-weight: var(--fw-semibold);
    margin-bottom: 2px;
}


/* =====================================================
   8. SECTION BASE
   Every content section shares this base padding.
   ===================================================== */

section {
    padding: 64px 0;
    border-bottom: var(--border);
}

section:last-of-type {
    border-bottom: none;
}


/* =====================================================
   9. ABOUT SECTION
   Two-col: text left, stats right.
   ===================================================== */

.about-text p {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 520px;
}

/* Stat box - bordered with shadow */
.stat-box {
    border: var(--border);
    padding: 20px;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-box:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-family: var(--font-head);
    font-size: 2.4rem;
    font-weight: var(--fw-bold);
    font-style: normal;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-regular);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-mid);
}


/* =====================================================
   10. EDUCATION SECTION
   Row list with institution name, detail and GPA.
   ===================================================== */

.edu-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    padding: 24px 0;
    border-top: var(--border-thin);
}

.edu-row:last-child {
    border-bottom: var(--border-thin);
}

.edu-school {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: var(--fw-semibold);
    font-style: normal;
    margin-bottom: 4px;
}

.edu-detail {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: var(--fw-light);
    font-style: normal;
    color: var(--grey-mid);
    line-height: 1.6;
}

.edu-gpa {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-bold);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--black);
    background-color: var(--yellow);
    padding: 4px 10px;
    border: var(--border);
    white-space: nowrap;
    margin-top: 4px;
    display: inline-block;
}


/* =====================================================
   11. SKILLS SECTION
   Three columns: Languages, Technologies, Concepts.
   ===================================================== */

/* Skill group column */
.skill-col {
    border: var(--border);
    padding: 24px;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

.skill-col h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: var(--border-thin);
}

/* Individual skill tag */
.skill-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 10px;
    border: var(--border-thin);
    margin: 4px 4px 4px 0;
    background-color: var(--off-white);
    transition: background-color 0.15s ease, box-shadow 0.1s ease, transform 0.1s ease;
}

.skill-tag:hover {
    background-color: var(--yellow);
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
}


/* =====================================================
   12. PROJECTS SECTION
   Numbered list of projects with description.
   ===================================================== */

.project-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    padding: 28px 0;
    border-top: var(--border-thin);
    align-items: start;
}

.project-item:last-child {
    border-bottom: var(--border-thin);
}

/* Index number */
.project-index {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-light);
    font-style: italic;
    color: var(--grey-mid);
    padding-top: 5px;
}

/* Project title */
.project-title {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: var(--fw-semibold);
    font-style: normal;
    margin-bottom: 6px;
}

/* Project description */
.project-desc {
    font-family: var(--font-mono);
    font-size: 0.83rem;
    font-weight: var(--fw-light);
    font-style: normal;
    color: #444;
    line-height: 1.75;
    margin-bottom: 10px;
}

/* Tech tag row */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Small tag for tech stack */
.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    background-color: var(--black);
    color: var(--white);
}


/* =====================================================
   13. AWARDS SECTION
   Simple list with award name and year on each row.
   ===================================================== */

.award-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    border-top: var(--border-thin);
}

.award-row:last-child {
    border-bottom: var(--border-thin);
}

.award-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: var(--fw-medium);
    font-style: normal;
}

.award-year {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: var(--fw-light);
    font-style: italic;
    color: var(--grey-mid);
    white-space: nowrap;
}


/* =====================================================
   14. CONTACT SECTION
   Large text links with arrow, one per line.
   ===================================================== */

/* Intro paragraph before links */
.contact-intro {
    font-size: 1rem;
    font-weight: var(--fw-light);
    font-style: italic;
    color: var(--grey-mid);
    max-width: 480px;
    margin-bottom: 32px;
}

/* Each contact link row */
.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-top: var(--border-thin);
    text-decoration: none;
    color: var(--black);
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.contact-row:last-of-type {
    border-bottom: var(--border-thin);
}

.contact-row:hover {
    background-color: var(--yellow);
    padding-left: 12px;
    text-decoration: none;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-medium);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--grey-mid);
    margin-bottom: 3px;
}

.contact-value {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: var(--fw-semibold);
    font-style: normal;
}

.contact-arrow {
    font-size: 1.1rem;
    font-weight: var(--fw-light);
    color: var(--grey-mid);
    transition: transform 0.15s ease, color 0.15s ease;
}

.contact-row:hover .contact-arrow {
    transform: translateX(6px);
    color: var(--black);
}


/* =====================================================
   15. FOOTER
   Simple one-line footer with copyright and links.
   ===================================================== */

footer {
    background-color: var(--black);
    border-top: var(--border);
    padding: 24px 28px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

footer p {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: var(--fw-light);
    font-style: normal;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0;
}

footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: var(--fw-regular);
    transition: color 0.15s ease;
}

footer a:hover {
    color: var(--yellow);
}

.footer-links {
    display: flex;
    gap: 20px;
}


/* =====================================================
   16. FADE-IN ANIMATIONS
   Simple entrance animation applied on page load.
   ===================================================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim-1 {
    animation: fadeUp 0.5s ease 0.05s both;
}

.anim-2 {
    animation: fadeUp 0.5s ease 0.15s both;
}

.anim-3 {
    animation: fadeUp 0.5s ease 0.25s both;
}

.anim-4 {
    animation: fadeUp 0.5s ease 0.35s both;
}


/* =====================================================
   17. RESPONSIVE - MOBILE
   Collapses multi-column layouts to single column.
   ===================================================== */

@media (max-width: 700px) {

    h1 {
        font-size: 2.6rem;
        letter-spacing: -1px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-photo-wrap {
        order: -1;
        max-width: 240px;
    }

    .hero-photo-wrap img {
        height: 240px;
    }

    .hero-meta {
        flex-wrap: wrap;
        gap: 16px;
    }

    .two-col,
    .three-col {
        grid-template-columns: 1fr;
    }

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


/* =====================================================
   18. PRINT STYLES
   Clean print: remove nav, background, enlarge text.
   ===================================================== */

@media print {

    nav {
        display: none;
    }

    body {
        background-color: #ffffff;
        background-image: none;
        font-size: 12pt;
    }

    .hero {
        padding-top: 20px;
    }

    .hero-photo-wrap {
        display: none;
    }

    .btn-primary,
    .btn-secondary {
        display: none;
    }

    .stat-box,
    .skill-col {
        box-shadow: none;
        border: 1pt solid #000;
    }

    a::after {
        content: " [" attr(href) "]";
        font-size: 9pt;
        color: #666;
    }

    nav a::after {
        content: none;
    }
}
