/*
 * Global Stylesheet for Afik Cohen's personal website
 *
 * The site uses a dark, futuristic palette inspired by Afik's work in AI and
 * hardware projects. Layouts are responsive and adapt gracefully to
 * smaller screens. Feel free to tweak the color variables at the top to
 * customize the theme.
 */

/* Root variables for easy theme adjustments */
:root {
    /* Dark, sleek theme with gold and cyan accents */
    --color-bg: #1a1a2e;
    --color-surface: #16213e;
    --color-primary: #d4af37;
    --color-primary-dark: #b8941f;
    --color-accent: #00d9ff;
    --color-text: #f5f5f5;
    --color-muted: #a8a8a8;
    --color-border: #2a2a4a;
}

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

body {
    font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background-color: #1a1410;
    background-image:
        linear-gradient(rgba(20, 15, 10, 0.6), rgba(20, 15, 10, 0.6)),
        url('/assets/AdobeStock_430235467.jpeg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Navigation bar */
nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(30, 20, 12, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav .logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

nav .logo:hover {
    opacity: 0.7 !important;
}

nav .logo-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.nav-social-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-social-links a {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-social-links a img {
    width: 24px;
    height: 24px;
    filter: invert(73%) sepia(45%) saturate(446%) hue-rotate(5deg) brightness(93%) contrast(87%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.nav-social-links a:hover img {
    filter: invert(83%) sepia(55%) saturate(546%) hue-rotate(5deg) brightness(103%) contrast(97%);
    transform: scale(1.15);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links li a:hover {
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    .nav-right {
        gap: 1rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .nav-container {
        padding: 0.75rem 1rem;
    }
    .nav-social-links {
        display: none;
    }
}

/* Experience section styling */
#experience .job {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--color-accent);
}

#experience .job h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

#experience .job .job-dates {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
    display: block;
}

#experience .job ul {
    margin-left: 1rem;
    list-style: disc;
    color: var(--color-muted);
    font-size: 0.95rem;
}

#experience .job ul li {
    margin-bottom: 0.4rem;
}

/* Hero section */
#hero {
    padding: 3rem 1.5rem 0rem;
    text-align: center;
    background: transparent;
}

#hero .social-links {
    margin-top: 1.5rem;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Profile photo */
#hero .profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--color-primary);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
    transition: opacity 0.15s ease;
    will-change: transform, opacity;
}

/* Hero text */
#hero .name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#hero .tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

#hero .summary {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-muted);
}

.cta-buttons .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    margin: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn {
    background-color: var(--color-primary);
    color: #1a1a2e;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.2);
}

.btn:hover {
    background-color: var(--color-primary-dark);
    color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.btn.secondary:hover {
    background-color: var(--color-accent);
    color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 217, 255, 0.4);
}

main {
    padding: 2rem 3rem;
}

section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    line-height: 1.4;
}

/* Global link styling for markdown content */
main a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

main a:hover {
    color: var(--color-primary-dark);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* About section styling */
#about p {
    margin-bottom: 1rem;
    max-width: 900px;
}

#about ul {
    margin-left: 1rem;
    margin-bottom: 1rem;
    list-style: disc;
}

#about ul li {
    margin-bottom: 0.4rem;
}

#about a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

#about a:hover {
    color: var(--color-primary-dark);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Projects grid */
.projects-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-card {
    display: block;
    background-color: rgba(30, 20, 12, 0.6);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

.project-card img,
.project-card video {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-card.align-top img,
.project-card.align-top video {
    object-position: top;
}

.project-card.align-bottom img,
.project-card.align-bottom video {
    object-position: bottom;
}

.project-card h3 {
    margin: 1rem;
    font-size: 1.3rem;
    color: var(--color-primary);
}

.project-card p {
    margin: 0 1rem 1.5rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* Blog list */
#blog ul.blog-list {
    margin-left: 1rem;
    list-style: disc;
}

#blog ul.blog-list li {
    margin-bottom: 0.4rem;
}

#blog a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

#blog a:hover {
    color: var(--color-primary-dark);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Social icons */
.social-links {
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    margin-right: 1.2rem;
    transition: transform 0.3s ease;
}

.social-links a img {
    width: 24px;
    height: 24px;
    /* Tint icons to gold */
    filter: invert(73%) sepia(45%) saturate(446%) hue-rotate(5deg) brightness(93%) contrast(87%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.social-links a:hover img {
    /* Brighter gold on hover */
    filter: invert(83%) sepia(55%) saturate(546%) hue-rotate(5deg) brightness(103%) contrast(97%);
    transform: scale(1.15);
    drop-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

footer {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #hero .name {
        font-size: 2.3rem;
    }
    #hero .tagline {
        font-size: 1.2rem;
    }
    #hero .summary {
        font-size: 0.9rem;
    }
    main {
        padding: 1rem 1.2rem;
    }
    .project-card img {
        height: 150px;
    }
    .projects-grid {
        gap: 1.5rem;
    }
}