/*
Theme Name: Hasan Portfolio
Theme URI: https://hasannagizade.com
Description: Custom portfolio theme for Hasan Nagizade
Author: Hasan Nagizade
Author URI: https://hasannagizade.com
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
*/

/* Self-hosted fonts for GDPR compliance */
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/instrument-serif-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/instrument-serif-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('fonts/dm-sans-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/dm-sans-italic.woff2') format('woff2');
}

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

:root {
    --bg: #0a0a0a;
    --bg-elevated: #131313;
    --bg-card: #171717;
    --bg-card-hover: #1e1e1e;
    --text-primary: #f0ece4;
    --text-secondary: #8a857d;
    --text-muted: #5a5650;
    --accent: #c9a96e;
    --accent-glow: rgba(201, 169, 110, 0.15);
    --border: #222;
    --border-light: #2a2a2a;
    --radius: 16px;
    --radius-sm: 10px;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

body {
    font-family: var(--font-body) !important;
    background: var(--bg) !important;
    color: var(--text-primary) !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Hide WP admin bar margin */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }

/* === NOISE OVERLAY === */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* === NAVIGATION === */
nav.portfolio-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.7);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    animation: pulse 8s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(110, 140, 201, 0.08) 0%, transparent 70%);
    bottom: 10%;
    right: 15%;
    filter: blur(60px);
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}
.hero-split {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    max-width: 1000px;
    text-align: left;
}
.hero-text {
    flex: 1;
}
.hero-text .hero-actions {
    justify-content: flex-start;
}
.hero-photo {
    flex-shrink: 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.5s;
    margin-top: 64px;
}
.hero-photo img {
    width: 200px !important;
    height: 200px !important;
    max-width: 200px !important;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid var(--border-light);
    display: block;
}
@media (max-width: 768px) {
    .hero-split {
        flex-direction: column-reverse;
        text-align: center;
        gap: 32px;
        align-items: center;
    }
    .hero-text .hero-actions {
        justify-content: center;
    }
    .hero-photo {
        margin-top: 0;
    }
    .hero-photo img {
        width: 150px !important;
        height: 150px !important;
        max-width: 150px !important;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-family: var(--font-display) !important;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
    color: var(--text-primary) !important;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 44px;
    line-height: 1.7;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.8s;
}

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

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: #d4b67a;
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 169, 110, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background: var(--bg-elevated);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn svg { width: 16px; height: 16px; }

/* === STATS BAR === */
.stats-bar {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    padding: 44px 60px;
    text-align: center;
    border-right: 1px solid var(--border);
    flex: 1;
    max-width: 300px;
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* === SECTION COMMON === */
.portfolio-section {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-display) !important;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.15;
    color: var(--text-primary) !important;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    font-weight: 300;
}

/* === PROJECT GRID === */
.projects-header { margin-bottom: 60px; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

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

.project-card-top {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.project-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.project-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
}

.project-info h3 {
    font-family: var(--font-body) !important;
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--text-primary) !important;
}

.project-category {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.project-tag {
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.project-links {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.store-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.store-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(201, 169, 110, 0.05);
}

.store-link svg { width: 14px; height: 14px; }

.store-link.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* === SKILLS === */
.skills-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.skill-group { margin-bottom: 36px; }

.skill-group-title {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

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

.skill-item {
    padding: 8px 18px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* === TIMELINE === */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
    padding-left: 24px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline-year {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.timeline-role {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === CONTACT === */
.contact-section { text-align: center; }

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 80px 60px;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(60px);
}

.contact-card .section-title,
.contact-card .section-subtitle,
.contact-card .section-label {
    position: relative;
    z-index: 1;
}

.contact-card .section-subtitle {
    margin: 0 auto 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 100px;
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--accent);
    background: rgba(201, 169, 110, 0.05);
    transform: translateY(-2px);
}

.contact-link svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* === FOOTER === */
.portfolio-footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
    nav.portfolio-nav { padding: 16px 24px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 0.75rem; }
    .portfolio-section { padding: 60px 24px; }
    .hero { padding: 100px 24px 60px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .stats-bar { flex-direction: column; }
    .stat { padding: 28px 24px; border-right: none; border-bottom: 1px solid var(--border); }
    .stat:last-child { border-bottom: none; }
    .project-grid { grid-template-columns: 1fr; }
    .skills-content { grid-template-columns: 1fr; gap: 40px; }
    .contact-card { padding: 48px 28px; }
    .contact-links { flex-direction: column; align-items: center; }
}
