/* ═══════════════════════════════════════════════════════════════════
   Ignacio Randazzo — Personal Portfolio
   Aesthetic: dark technical, clean, professional
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --bg-card: #161b22;
    --bg-hover: #1c2330;
    --border: #30363d;
    --border-bright: #58a6ff;
    --text: #c9d1d9;
    --text-dim: #8b949e;
    --text-bright: #f0f6fc;
    --accent: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.15);
    --accent-dim: rgba(88, 166, 255, 0.4);
    --green: #3fb950;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 820px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Navigation ────────────────────────────────────────────── */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s ease, background 0.3s ease;
}

.nav-brand {
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-external {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s, color 0.2s;
}

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

/* ── Layout ────────────────────────────────────────────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border);
}

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

/* ── Section Titles ────────────────────────────────────────── */
.section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 32px;
    font-family: var(--font-mono);
}

/* ── Hero ──────────────────────────────────────────────────── */
#top {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero {
    max-width: var(--max-width);
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.hero-greeting {
    color: var(--accent);
    font-size: 15px;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.hero-name {
    font-size: clamp(40px, 7vw, 64px);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-tagline {
    font-size: 20px;
    color: var(--text);
    line-height: 1.5;
    max-width: 600px;
    margin-bottom: 28px;
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 36px;
}

.hero-meta svg {
    margin-right: 6px;
    vertical-align: middle;
}

.hero-meta a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.hero-meta a:hover {
    color: var(--accent);
}

.hero-sep {
    color: var(--border);
}

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

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: #79b8ff;
    border-color: #79b8ff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent-dim);
    color: var(--text-bright);
    background: var(--bg-hover);
}

/* ── Hero Glow ─────────────────────────────────────────────── */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* ── About ─────────────────────────────────────────────────── */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-content p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
}

.about-content strong {
    color: var(--text-bright);
    font-weight: 600;
}

.about-content a {
    color: var(--accent);
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.about-content a:hover {
    text-decoration: underline;
}

/* ── Expertise ─────────────────────────────────────────────── */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.expertise-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
}

.expertise-card:hover {
    border-color: var(--accent-dim);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.expertise-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.expertise-card h3 {
    color: var(--text-bright);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.expertise-card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Project Card ──────────────────────────────────────────── */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    transition: border-color 0.2s;
}

.project-card:hover {
    border-color: var(--accent-dim);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.project-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.project-full {
    font-size: 14px;
    color: var(--text-dim);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s;
}

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

.project-desc {
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.tech-pill {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── Contact ───────────────────────────────────────────────── */
.contact-intro {
    color: var(--text);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 500px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 24px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: var(--accent-dim);
    background: var(--bg-hover);
    transform: translateX(4px);
}

.contact-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 15px;
    color: var(--text-bright);
    font-family: var(--font-mono);
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 4px;
}

.footer-sub {
    font-size: 12px !important;
    color: var(--border) !important;
}

/* ── Reveal Animation ──────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    #nav {
        padding: 14px 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .nav-external {
        display: none;
    }

    section {
        padding: 60px 0;
    }

    .hero-tagline {
        font-size: 17px;
    }

    .hero-meta {
        font-size: 13px;
    }

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

    .project-card {
        padding: 24px;
    }

    .project-header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 12px;
    }

    .nav-links a:not(.nav-external) {
        font-size: 12px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* ── Accessibility ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}