/*
Theme Name: Riccardo Coates Portfolio
Theme URI: https://riccardocoates.me
Author: Riccardo
Author URI: https://riccardocoates.me
Description: Portfolio of Riccardo Coates, a Dynamic Property and Mortgage Advisor.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
Text Domain: riccardo-coates
*/
/* =========================================================================
   BASE STYLES & VARIABLES
   ========================================================================= */
:root {
    /* Premium dark palette */
    --bg-main: #0f1115;
    --bg-darker: #151922;
    --bg-surface: #1b2230;
    --bg-surface-light: #232d3e;

    --text-primary: #f5f7fa;
    --text-secondary: #c9d1dc;
    --text-muted: #98a3b3;

    /* Warm metallic accent */
    --accent: #d1b28d;
    --accent-hover: #e3c39c;
    --accent-glow: rgba(209, 178, 141, 0.2);

    --border-color: rgba(255, 255, 255, 0.14);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 100px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    background-image: url('pexels-photo-1287075.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 14, 0.78);
    z-index: -2;
    pointer-events: none;
}

body.menu-open {
    overflow: hidden;
}

/* Background Gradients for depth */
.bg-gradient-1,
.bg-gradient-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

.bg-gradient-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(209, 178, 141, 0.22) 0%, rgba(15, 17, 21, 0) 70%);
    top: -200px;
    left: -200px;
}

.bg-gradient-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(104, 133, 171, 0.16) 0%, rgba(15, 17, 21, 0) 70%);
    bottom: -100px;
    right: -100px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-normal);
}

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

/* Accessibility: Focus visible styles */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 100px 0;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.mt-4 {
    margin-top: 2rem;
}

/* =========================================================================
   UI COMPONENTS
   ========================================================================= */
/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-normal);
    text-transform: uppercase;
    font-size: 0.9rem;
}

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

.primary-btn:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

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

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

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: 60px;
    text-align: center;
}

#resume .section-title,
#portfolio .section-title,
#contact .section-title {
    margin-top: -16px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

/* =========================================================================
   NAVIGATION
   ========================================================================= */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(15, 17, 21, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 5px 0;
    background: rgba(15, 17, 21, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-normal);
}

.navbar.scrolled .nav-container {
    padding: 15px 5%;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(209, 178, 141, 0.5);
    background: linear-gradient(145deg, rgba(209, 178, 141, 0.22), rgba(209, 178, 141, 0.08));
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition-normal);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

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

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    background: transparent;
    border: none;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    padding-top: 80px;
    /* Offset for navbar */
}

.hero-content {
    max-width: 800px;
    z-index: 10;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #4caf50;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.greeting {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-profile {
    width: 250px;
    height: 250px;
    margin: 0 auto 30px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-primary);
    position: relative;
    transition: color var(--transition-fast), -webkit-text-stroke var(--transition-fast);
}

.hero h1 span.hero-title-accent {
    color: var(--accent);
    -webkit-text-stroke: 0;
}

.hero h1 span::before {
    content: 'Riccardo';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    width: 0;
    overflow: hidden;
    animation: fillText 3s linear forwards;
    -webkit-text-stroke: 0px;
}

@keyframes fillText {
    0% {
        width: 0;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 100%;
    }
}

.hero h2 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

@keyframes bounce {

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

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

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

/* =========================================================================
   ABOUT SECTION
   ========================================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.personal-info {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.info-item .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.info-item .value {
    font-weight: 500;
    color: var(--text-primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.skill-bars {
    margin-top: 20px;
}

.skill-bar {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

.progress-line {
    height: 4px;
    width: 100%;
    background: var(--bg-surface-light);
    /* Lighter for visibility */
    border-radius: 2px;
    position: relative;
}

.progress-line span {
    position: absolute;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0;
    /* Animated via JS */
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =========================================================================
   RESUME SECTION
   ========================================================================= */
.resume-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin-top: 10px;
    align-items: start;
}

.timeline-column {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.timeline-column:hover {
    transform: translateY(-6px);
    border-color: rgba(209, 178, 141, 0.45);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(209, 178, 141, 0.14);
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.timeline-title i {
    color: var(--accent);
}

.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 2px solid var(--accent);
    transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-item h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-item h5 {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 15px;
}

.timeline-item ul {
    list-style-type: none;
}

.timeline-item li {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.timeline-item li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* =========================================================================
   PORTFOLIO SECTION
   ========================================================================= */
.portfolio-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
    z-index: 2;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
    border-color: rgba(209, 178, 141, 0.35);
}

.portfolio-card:hover::before {
    transform: scaleX(1);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 14px;
    opacity: 0.8;
}

.portfolio-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.portfolio-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================================================
   CONTACT SECTION
   ========================================================================= */
.contact-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 0;
}

.contact-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.contact-card p,
.contact-card a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-decoration: none;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
footer {
    background: var(--bg-main);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(209, 178, 141, 0.5);
    background: linear-gradient(145deg, rgba(209, 178, 141, 0.22), rgba(209, 178, 141, 0.08));
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* =========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #101010;
        --bg-darker: #171717;
        --bg-surface: #1e1e1e;
        --bg-surface-light: #2a2a2a;
        --text-primary: #f6f4f1;
        --text-secondary: #d8d2cb;
        --text-muted: #b9b1a8;
        --accent: #cfb296;
        --accent-hover: #e0c4a9;
        --accent-glow: rgba(207, 178, 150, 0.2);
        --border-color: rgba(255, 255, 255, 0.14);
    }

    .navbar {
        background: rgba(16, 16, 16, 0.8);
    }

    .navbar.scrolled {
        background: rgba(16, 16, 16, 0.96);
    }

    body::before {
        background: rgba(16, 16, 16, 0.78);
    }
}

/* Responsive Design */
@media (max-width: 992px) {

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

    .timeline-column {
        padding: 22px;
    }

    .personal-info {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: var(--bg-surface-light);
        border-left: 1px solid var(--border-color);
        padding-top: 80px;
        transition: 0.4s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
        /* Softer shadow */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 20px 40px;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        padding: 0 20px;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

@media print {
    :root {
        --bg-main: #ffffff;
        --bg-darker: #ffffff;
        --bg-surface: #ffffff;
        --bg-surface-light: #ffffff;
        --text-primary: #000000;
        --text-secondary: #111111;
        --text-muted: #222222;
        --accent: #000000;
        --border-color: #cccccc;
        --accent-glow: transparent;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .navbar,
    .scroll-indicator,
    .bg-gradient-1,
    .bg-gradient-2,
    .social-links,
    .hamburger {
        display: none !important;
    }

    .hero,
    .section-padding {
        min-height: 0;
        padding: 30px 0;
    }

    a[href^='http']::after,
    a[href^='mailto:']::after,
    a[href^='tel:']::after {
        content: ' (' attr(href) ')';
        font-size: 0.85em;
        color: #444444;
    }
}