/* =============================================
   SEBASTIAN GRBOVIC — PORTFOLIO
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&family=Syne:wght@700;800&display=swap');

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --accent: rgba(148, 200, 255, 0.85);
    --accent-dim: rgba(148, 200, 255, 0.15);
    --accent-border: rgba(148, 200, 255, 0.25);
    --bg: #0a0a0f;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #e8e4dc;
    --text-muted: rgba(232, 228, 220, 0.45);
    --text-dim: rgba(232, 228, 220, 0.25);
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --green: #4ade80;
    --nav-bg: rgba(10, 10, 15, 0.85);
    --grid-line: rgba(255,255,255,0.018);
    --title-color: #fff;
    --social-filter: invert(1);
}

/* ---- Light mode overrides ---- */
body.light-mode {
    --accent: rgba(30, 100, 200, 0.9);
    --accent-dim: rgba(30, 100, 200, 0.1);
    --accent-border: rgba(30, 100, 200, 0.25);
    --bg: #f5f4f0;
    --bg-surface: rgba(0, 0, 0, 0.03);
    --border: rgba(0, 0, 0, 0.09);
    --border-hover: rgba(0, 0, 0, 0.22);
    --text-primary: #1a1a1a;
    --text-muted: rgba(26, 26, 26, 0.55);
    --text-dim: rgba(26, 26, 26, 0.35);
    --green: #16a34a;
    --nav-bg: rgba(245, 244, 240, 0.88);
    --grid-line: rgba(0,0,0,0.04);
    --title-color: #0f0f0f;
    --social-filter: invert(0);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 50% at 75% 30%, rgba(148, 200, 255, 0.055) 0%, transparent 65%),
        radial-gradient(ellipse 50% 45% at 20% 75%, rgba(100, 180, 150, 0.04) 0%, transparent 60%),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 52px 52px, 52px 52px;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---- Navigation ---- */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 0.5px solid var(--border);
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.menu-logo {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.menu-logo span {
    color: var(--accent);
}

/* Menu right group */
.menu-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme toggle button */
#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-hover);
    background: var(--bg-surface);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#theme-toggle:hover {
    background: var(--accent-dim);
    border-color: var(--accent-border);
    transform: rotate(20deg) scale(1.1);
}

#theme-toggle .theme-icon {
    line-height: 1;
    pointer-events: none;
}

.menu nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.menu nav ul li a {
    display: block;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    transition: color 0.2s ease;
    position: relative;
}

.menu nav ul li a:hover {
    color: var(--text-primary);
}

.menu nav ul li a[aria-current="page"] {
    color: var(--text-primary);
}

.menu nav ul li a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 18px;
    right: 18px;
    height: 1px;
    background: var(--accent);
    border-radius: 1px;
}

/* ---- Hamburger / mobile nav toggle ---- */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-hover);
    background: var(--bg-surface);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

.nav-toggle:hover {
    background: var(--accent-dim);
    border-color: var(--accent-border);
}

.nav-toggle-bars {
    position: relative;
    width: 16px;
    height: 11px;
}

.nav-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }

.nav-toggle.open .nav-toggle-bars span:nth-child(1) {
    top: 5px;
    transform: rotate(45deg);
}
.nav-toggle.open .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .nav-toggle-bars span:nth-child(3) {
    top: 5px;
    transform: rotate(-45deg);
}

/* Language toggle */
.menu-lang-wrap {
    display: flex;
    align-items: center;
}

#language-toggle {
    width: 28px;
    height: auto;
    cursor: pointer;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

#language-toggle:hover {
    opacity: 1;
}

/* ---- Page wrapper ---- */
.page-wrap {
    padding-top: 60px;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 48px;
    padding-right: 48px;
}

/* ---- Hero Section ---- */
.home-section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: end;
    margin-bottom: 56px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 22px;
    opacity: 0.85;
}

.hero-tag::before {
    content: '';
    width: 22px;
    height: 1px;
    background: currentColor;
}

.title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 68px);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--title-color);
    margin-bottom: 10px;
    background: none;
    -webkit-text-fill-color: var(--title-color);
    animation: none;
}

.hero-role {
    font-family: var(--font-display);
    font-size: clamp(20px, 3.5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.subtitle {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 36px;
    text-align: left;
    white-space: normal;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: #0a0a0f;
    background: var(--text-primary);
    border: none;
    padding: 11px 26px;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    background: transparent;
    border: 0.5px solid var(--border-hover);
    padding: 11px 26px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-1px);
}

/* Download CV button (alias for btn-primary) */
.download-cv-button {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: #0a0a0f;
    background: var(--text-primary);
    border: none;
    padding: 11px 26px;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    margin-top: 24px;
}

.download-cv-button:hover {
    background: #fff;
    transform: translateY(-1px);
}

/* ---- Profile / Avatar ---- */
.profile-container {
    position: static;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 0.5px solid var(--border-hover);
    object-fit: cover;
    animation: fadeUp 0.8s ease forwards;
}

.profile-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ---- Stats strip ---- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
    margin-bottom: 48px;
}

.stat-item {
    padding: 22px 0;
    text-align: center;
    border-right: 0.5px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---- Tech pills ---- */
.tech-pill-row {
    margin-bottom: 0;
}

.section-eyebrow {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 14px;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    border: 0.5px solid var(--border);
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--bg-surface);
    transition: all 0.2s;
    cursor: default;
}

.pill:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.pill.accent {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

/* ---- Section titles (non-hero) ---- */
.section-header {
    margin-bottom: 40px;
    padding-top: 80px;
}

.section-header .title {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 12px;
}

.section-intro {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-muted);
    max-width: 600px;
}

/* ---- About section ---- */
#about .summary {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 680px;
    margin-bottom: 24px;
    text-align: left;
    font-weight: 300;
    font-style: italic;
    border-left: 2px solid var(--accent-border);
    padding-left: 20px;
}

#about .subtitle {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-muted);
    max-width: 680px;
    text-align: left;
    white-space: pre-wrap;
}

/* ---- Technologies: tagline badges ---- */
.tech-tagline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 48px;
}

.tagline-badge {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border: 0.5px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-surface);
}

/* ---- Technology categories ---- */
.tech-category {
    margin-bottom: 44px;
}

.tech-category .section-eyebrow {
    margin-bottom: 14px;
}

/* ---- Technologies grid ---- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

/* ---- Technology card ---- */
.tech-card {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 10px;
    border: 0.5px solid var(--border);
    border-radius: 14px;
    background: var(--bg-surface);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s ease,
                background 0.22s ease,
                box-shadow 0.22s ease;
}

.tech-card:hover,
.tech-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 12px 32px -12px rgba(148, 200, 255, 0.25);
    outline: none;
}

body.light-mode .tech-card:hover,
body.light-mode .tech-card:focus-visible {
    box-shadow: 0 12px 32px -16px rgba(30, 100, 200, 0.3);
}

.tech-card img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: grayscale(15%) brightness(0.95);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;
}

.tech-card:hover img,
.tech-card:focus-visible img {
    transform: scale(1.12);
    filter: grayscale(0%) brightness(1);
}

.tech-card-name {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    text-align: center;
    line-height: 1.2;
}

.tech-card-cat {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ---- Slide-over overlay ---- */
.tech-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1900;
}

.tech-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

body.light-mode .tech-overlay {
    background: rgba(0, 0, 0, 0.25);
}

/* ---- Slide-over panel ---- */
.tech-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 440px;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(148, 200, 255, 0.06) 0%, transparent 60%);
    border-left: 0.5px solid var(--border-hover);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.35);
    z-index: 2000;
    padding: 32px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-panel.open {
    transform: translateX(0);
}

body.tech-panel-active {
    overflow: hidden;
}

.tech-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-hover);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 28px;
}

.tech-panel-close:hover {
    color: var(--text-primary);
    background: var(--accent-dim);
    border-color: var(--accent-border);
    transform: rotate(90deg);
}

.tech-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.tech-panel-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    padding: 10px;
    border: 0.5px solid var(--border);
    border-radius: 14px;
    background: var(--bg-surface);
}

.tech-panel-cat {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.tech-panel-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--title-color);
}

.tech-panel-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 0.5px solid var(--border);
}

.tech-panel-exp-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.tech-panel-exp-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-panel-exp-list li {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    padding-left: 22px;
    position: relative;
}

.tech-panel-exp-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}


/* ---- Project cards ---- */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.project-card {
    background: var(--bg-surface);
    border: 0.5px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.project-card:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.04);
    transform: translateY(-3px);
}

.project-card h2 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary) !important;
    line-height: 1.4;
}

.project-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border: 0.5px solid var(--accent-border);
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--accent-dim);
    transition: all 0.2s;
}

.project-link:hover {
    background: rgba(148, 200, 255, 0.22);
    border-color: rgba(148, 200, 255, 0.45);
}

.github-project {
    text-align: center;
    margin-top: 16px;
}

.github-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    border: 0.5px solid var(--border-hover);
    padding: 10px 24px;
    border-radius: 24px;
    transition: all 0.2s;
}

.github-link:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.35);
}

/* ---- Experience section ---- */
.experience-section {
    margin-top: 40px;
}

.experience-list {
    display: flex;
    flex-direction: column;
    border: 0.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.experience-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    padding: 24px 28px;
    border-bottom: 0.5px solid var(--border);
    transition: background 0.2s;
    margin-bottom: 0;
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-item:hover {
    background: rgba(255,255,255,0.025);
}

.experience-date {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    padding-top: 3px;
    width: auto;
}

.experience-details h3 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.experience-details p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tags span {
    font-size: 11px;
    color: var(--text-dim);
    border: 0.5px solid var(--border);
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bg-surface);
    letter-spacing: 0.03em;
}

/* ---- Footer ---- */
footer {
    border-top: 0.5px solid var(--border);
    padding: 32px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 80px;
    position: relative;
}

footer p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
}

.social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 0;
    justify-content: flex-start;
}

.maskin-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    border: 0.5px solid var(--border);
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--bg-surface);
    transition: color 0.2s, border-color 0.2s;
}

.maskin-link:hover {
    color: var(--accent);
    border-color: var(--accent-border);
}

.maskin-link .maskin-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

.social-logo {
    width: 22px;
    height: 22px;
    cursor: pointer;
    filter: var(--social-filter);
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
}

.social-logo:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.language-switch {
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
}

.flag-icon {
    width: 28px;
    height: auto;
    cursor: pointer;
    border-radius: 3px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.flag-icon:hover {
    opacity: 1;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fadeIn {
    animation: fadeUp 0.7s ease forwards;
}

/* ---- Responsive ---- */
@media (max-width: 900px) and (min-width: 769px) {
    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .menu {
        padding: 12px 20px;
        flex-wrap: wrap;
        height: auto;
    }

    .nav-toggle {
        display: flex;
    }

    .menu nav {
        order: 3;
        width: 100%;
    }

    .menu nav ul {
        flex-direction: column;
        gap: 2px;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
        margin-top: 0;
    }

    .menu nav ul.open {
        max-height: 320px;
        opacity: 1;
        margin-top: 8px;
        margin-bottom: 12px;
    }

    .menu nav ul li {
        width: 100%;
    }

    .menu nav ul li a {
        padding: 12px 4px;
        border-radius: 0;
        border-bottom: 0.5px solid var(--border);
    }

    .menu nav ul li:last-child a {
        border-bottom: none;
    }

    .menu nav ul li a[aria-current="page"]::after {
        display: none;
    }

    .menu nav ul li a[aria-current="page"] {
        color: var(--accent);
    }

    .page-wrap {
        padding-top: 8px;
        padding-left: 20px;
        padding-right: 20px;
    }

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

    .profile-container {
        flex-direction: row;
        justify-content: flex-start;
    }

    .profile-pic {
        width: 72px;
        height: 72px;
        border-radius: 10px;
    }

    .stats-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tech-panel {
        width: 100%;
        max-width: none;
    }

    .experience-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    footer {
        padding: 24px 20px;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: none;
        border-bottom: 0.5px solid var(--border);
    }

    .stat-item:last-child {
        border-bottom: none;
    }
}