/* ============================================================
   AMIR MIRZAEI — PERSONAL WEBSITE
   Premium Redesign 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
    --accent: #0057ff;
    --accent-light: #e8efff;
    --accent-glow: rgba(0, 87, 255, 0.15);

    --bg: #ffffff;
    --bg-alt: #f7f7f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4ff;

    --text-primary: #0d0d0d;
    --text-secondary: #555;
    --text-muted: #999;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --nav-bg: rgba(255, 255, 255, 0.7);
    --nav-border: rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 100px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #0a0a0a;
    --bg-alt: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1c1c2e;

    --text-primary: #f0f0f0;
    --text-secondary: #aaa;
    --text-muted: #555;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(10, 10, 10, 0.75);
    --nav-border: rgba(255, 255, 255, 0.07);
    --accent-light: #0d1a40;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ─── LAYOUT ────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

.section-alt {
    background: var(--bg-alt);
}

/* ─── TYPOGRAPHY ────────────────────────────────────────── */
.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    background: var(--accent-light);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.section-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 56px;
    line-height: 1.7;
}

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 87, 255, 0.35);
}

.btn-primary:hover {
    background: #0040cc;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 87, 255, 0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-strong);
}

.btn-ghost:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-large {
    font-size: 17px;
    padding: 18px 40px;
}

/* ─── NAVBAR ────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: all var(--transition);
}

.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--shadow);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.nav-brand:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--border);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    transform: rotate(20deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.hamburger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0 20px;
    border-top: 1px solid var(--border);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    margin: 0 12px;
}

.mobile-link:hover {
    color: var(--accent);
    background: var(--accent-light);
}

/* ─── HERO ──────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
    padding: 120px 24px 80px;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: orbFloat 8s ease-in-out infinite;
}

[data-theme="dark"] .hero-orb {
    opacity: 0.2;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #0057ff 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    bottom: -100px;
    left: -50px;
    animation-delay: -3s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #0ea5e9 0%, transparent 70%);
    top: 40%;
    right: 30%;
    animation-delay: -5s;
    opacity: 0.25;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-15px, 15px) scale(0.97);
    }
}

.hero-content {
    grid-column: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text-muted);
}

.hero-name {
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 16px;
    line-height: 1.4;
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 440px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Hero Photo */
.hero-photo {
    grid-column: 2;
    flex-shrink: 0;
}

.photo-ring {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent), #7c3aed, #0ea5e9);
    box-shadow: 0 20px 60px rgba(0, 87, 255, 0.25);
}

.photo-ring::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #7c3aed, #0ea5e9);
    opacity: 0.3;
    animation: ringPulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes ringPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.15;
    }
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--border-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    animation: bounce 2s ease-in-out infinite;
    transition: all var(--transition);
}

.scroll-hint:hover {
    border-color: var(--accent);
    color: var(--accent);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* ─── ABOUT ─────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-text .section-heading {
    margin-bottom: 24px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

/* ─── EXPERIENCE CARDS ──────────────────────────────────── */
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #7c3aed);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 87, 255, 0.25);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 87, 255, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.card-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
    transition: all var(--transition);
}

.card:hover .card-icon {
    background: var(--accent);
    color: #fff;
}

.card-company {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    flex: 1;
}

.card-impacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-impacts li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.card-impacts li i {
    color: #22c55e;
    font-size: 11px;
    flex-shrink: 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.2px;
    transition: all var(--transition);
}

.card:hover .tag {
    background: rgba(0, 87, 255, 0.12);
}

/* ─── SKILLS ────────────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.skill-group h4 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pills span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    cursor: default;
}

.skill-pills span:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
}

/* ─── RESUME ────────────────────────────────────────────── */
.resume-container {
    text-align: center;
    max-width: 600px;
}

.resume-container .section-label,
.resume-container .section-heading,
.resume-container .section-sub {
    margin-left: auto;
    margin-right: auto;
}

/* ─── CONTACT ───────────────────────────────────────────── */
.contact-container {
    text-align: center;
    max-width: 700px;
}

.contact-container .section-label,
.contact-container .section-heading,
.contact-container .section-sub {
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.contact-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.contact-card i {
    font-size: 18px;
    color: var(--accent);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 87, 255, 0.1);
    color: var(--accent);
}

/* ─── FOOTER ────────────────────────────────────────────── */
.footer {
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── SCROLL REVEAL ─────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for child items */
.about-stats .stat-card:nth-child(1) {
    transition-delay: 0.05s;
}

.about-stats .stat-card:nth-child(2) {
    transition-delay: 0.1s;
}

.about-stats .stat-card:nth-child(3) {
    transition-delay: 0.15s;
}

.about-stats .stat-card:nth-child(4) {
    transition-delay: 0.2s;
}

.cards .card:nth-child(1) {
    transition-delay: 0.05s;
}

.cards .card:nth-child(2) {
    transition-delay: 0.12s;
}

.cards .card:nth-child(3) {
    transition-delay: 0.18s;
}

.cards .card:nth-child(4) {
    transition-delay: 0.25s;
}

.contact-links .contact-card:nth-child(1) {
    transition-delay: 0.05s;
}

.contact-links .contact-card:nth-child(2) {
    transition-delay: 0.1s;
}

.contact-links .contact-card:nth-child(3) {
    transition-delay: 0.15s;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .hero-photo {
        grid-column: 1;
        order: -1;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    .hero-sub {
        margin: 0 auto 40px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .section {
        padding: 80px 0;
    }

    .hero {
        padding: 100px 24px 80px;
    }

    .photo-ring {
        width: 200px;
        height: 200px;
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}