/* --- General Styles & Resets --- */
:root {
    --primary-color: #021123; /* Very dark blue, inspired by the jacket */
    --secondary-color: #041a33; /* Slightly lighter dark blue */
    --lightest-navy: #1d3557; /* A muted blue for borders/backgrounds */
    --slate: #b0c4de; /* Lighter blue-gray for text */
    --light-slate: #ccd6f6;
    --lightest-slate: #ffffff; /* White for main headings */
    --white: #e6f1ff;
    --accent-primary: #ffb703; /* Vibrant orange/yellow from image bg */
    --accent-secondary: #3a86ff; /* Vibrant blue from jacket */
    --font-sans: 'Calibri', 'San Francisco', 'SF Pro Text', -apple-system, system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--primary-color);
    color: var(--slate);
    line-height: 1.6;
    padding: 0 50px;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

a:hover {
    color: var(--accent-primary);
    filter: brightness(1.2);
}

h1, h2, h3 {
    color: var(--lightest-slate);
    font-weight: 600;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    font-size: 2rem;
    white-space: nowrap;
}

.section-heading::after {
    content: '';
    display: block;
    position: relative;
    top: 2px;
    width: 300px;
    height: 1px;
    margin-left: 20px;
    background-color: var(--lightest-navy);
}

/* --- Header / Navigation --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 50px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: rgba(2, 17, 35, 0.85);
    backdrop-filter: blur(10px);
    transition: top 0.3s;
    box-sizing: border-box;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 30%;
}

.main-nav ol {
    display: flex;
    list-style: none;
    align-items: center;
    counter-reset: item; /* Fix: Reset the counter */
}

.main-nav li {
    margin: 0 15px;
    font-family: var(--font-mono);
}

.main-nav a {
    counter-increment: item 1;
}

.main-nav a::before {
    content: "0" counter(item) ".";
    margin-right: 5px;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 11;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--accent-primary);
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: center;
    width: 100%;
}

#hero h1 {
    font-size: clamp(40px, 6vw, 60px);
    margin: 0;
}

#hero .name {
    color: var(--lightest-slate);
    margin-bottom: 10px; /* Fix: Reduced margin */
}

#hero .subtitle {
    color: var(--slate);
    margin-top: -10px;
    font-size: clamp(24px, 4vw, 36px);
}

#hero p.intro {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    margin-bottom: 10px; /* Fix: Reduced margin */
    font-size: 1.3rem; /* Fix: Increased font size */
}

#hero .summary {
    max-width: 600px;
    margin-top: 25px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-decoration: none;
}

.cta-button.primary {
    background-color: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.cta-button.primary:hover {
    background-color: rgba(255, 183, 3, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -10px var(--accent-primary);
}

.cta-button.secondary {
    background-color: transparent;
    border: 1px solid var(--slate);
    color: var(--slate);
}

.cta-button.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.hero-image-container {
    max-width: 300px;
    max-height: 300px;
    justify-self: center;
    position: relative;
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-primary);
    border-radius: 5px;
    z-index: -1;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.hero-image-container:hover::before {
    top: 15px;
    left: 15px;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid var(--accent-primary);
}

/* --- About Section --- */
#about .inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

#about .about-text {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 5px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#about .about-text:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(255, 183, 3, 0.3);
}

#about p {
    margin-bottom: 15px;
    line-height: 1.7;
    transition: color 0.25s ease;
}

#about p:hover {
    color: var(--light-slate);
}

/* --- Experience Section --- */
.job {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--secondary-color);
    border-radius: 5px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.job:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(255, 183, 3, 0.3);
}

.job-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--lightest-slate);
    transition: color 0.3s ease;
}

.job:hover .job-title {
    color: var(--accent-primary);
}

.job-title span {
    color: var(--accent-primary);
}

.job-period {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--light-slate);
    margin-bottom: 15px;
}

.job-description ul {
    list-style: none;
}

.job-description li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    transition: color 0.25s ease;
}

.job-description li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    transition: transform 0.25s ease;
}

.job-description li:hover::before {
    transform: translateX(5px);
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    border: 1px solid transparent;
    position: relative;
}

.project-card:hover {
    transform: translateY(-7px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(255, 183, 3, 0.3);
}

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

.project-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--lightest-slate);
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--accent-primary);
}

.project-links {
    display: flex;
    gap: 5px;
}

.project-links a {
    color: var(--slate);
    margin-left: 10px;
    transition: all 0.25s ease;
}

.project-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.project-links svg {
    width: 22px;
    height: 22px;
}

.project-description {
    font-size: 1rem;
    flex-grow: 1;
    line-height: 1.6;
}

.project-tech-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--light-slate);
}

.project-tech-list li {
    margin-right: 15px;
    margin-bottom: 5px;
    color: var(--accent-primary);
    transition: color 0.25s ease;
}

.project-tech-list li:hover {
    color: var(--lightest-slate);
}

/* --- Skills Section --- */
#skills .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(255, 183, 3, 0.3);
}

.skill-category h3 {
    color: var(--accent-primary);
    border-bottom: 1px solid var(--lightest-navy);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.skill-category ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-category li {
    background-color: var(--lightest-navy);
    color: var(--lightest-slate);
    padding: 5px 10px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.skill-category li:hover {
    background-color: rgba(255, 183, 3, 0.1);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* --- Contact Section --- */
#contact {
    text-align: center;
}

.contact-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    margin-bottom: 20px;
}

#contact h2 {
    font-size: 2.5rem;
}

#contact p {
    max-width: 600px;
    margin: 20px auto;
}

.contact-button {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-top: 20px;
}

.contact-button:hover {
    background-color: rgba(255, 183, 3, 0.1);
    text-decoration: none;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

#footer-social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

#footer-social-links a {
    color: var(--slate);
}

#footer-social-links a:hover {
    color: var(--accent-primary);
}

#footer-social-links svg {
    width: 20px;
    height: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image-container {
        order: -1;
        margin-bottom: 40px;
        max-width: 250px;
        max-height: 250px;
    }
    .hero-text .summary {
        margin-left: auto;
        margin-right: auto;
    }

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

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    #skills .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 0 20px;
    }

    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 80px 0;
    }

    .section-heading {
        font-size: 1.5rem;
    }

    .section-heading::after {
        width: 100px;
    }

    .main-header {
        padding: 1.2rem 20px;
    }

    .logo img {
        width: 55px;
        height: 55px;
    }

    .hamburger .bar {
        width: 28px;
        height: 3px;
        margin: 6px auto;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(75vw, 400px);
        height: 100vh;
        background-color: var(--lightest-navy);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
        box-shadow: -10px 0px 30px -15px var(--primary-color);
    }

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

    .main-nav ol {
        flex-direction: column;
        padding: 0;
        width: 100%;
    }

    .main-nav li {
        margin: 20px 0;
        text-align: center;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #hero h1 {
        font-size: clamp(32px, 5vw, 50px);
    }

    #hero .subtitle {
        font-size: clamp(20px, 3.5vw, 30px);
    }

    #hero p.intro {
        font-size: 1.1rem;
    }

    #hero .summary {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .cta-button {
        text-align: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

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

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

    #contact h2 {
        font-size: 2rem;
    }

    .contact-image {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0 15px;
    }

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 60px 0;
    }

    .main-header {
        padding: 1rem 15px;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }

    .hamburger .bar {
        width: 30px;
        height: 3.5px;
        margin: 6px auto;
    }

    .section-heading {
        font-size: 1.3rem;
        margin-bottom: 30px;
    }

    .section-heading::after {
        width: 50px;
        margin-left: 10px;
    }

    #hero {
        min-height: auto;
        padding-top: 120px;
    }

    #hero h1 {
        font-size: clamp(28px, 7vw, 40px);
    }

    #hero .subtitle {
        font-size: clamp(18px, 5vw, 26px);
    }

    #hero p.intro {
        font-size: 1rem;
    }

    #hero .summary {
        font-size: 0.95rem;
        margin-top: 20px;
    }

    .hero-image-container {
        max-width: 200px;
        max-height: 200px;
        margin-bottom: 30px;
    }

    .hero-image-container::before {
        top: 15px;
        left: 15px;
    }

    .cta-button {
        padding: 0.85rem 1.75rem;
        font-size: 0.9rem;
    }

    .job {
        padding: 15px;
        margin-bottom: 30px;
    }

    .job-title {
        font-size: 1.1rem;
    }

    .job-description li {
        font-size: 0.95rem;
        padding-left: 25px;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.2rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .project-tech-list {
        font-size: 0.75rem;
    }

    .skill-category {
        padding: 15px;
    }

    .skill-category h3 {
        font-size: 1rem;
    }

    .skill-category li {
        font-size: 0.85rem;
        padding: 4px 8px;
    }

    #contact {
        min-height: 65vh;
        /* margin: 0 auto; */
    }

    #contact h2 {
        font-size: 1.7rem;
    }

    #contact p {
        font-size: 0.95rem;
    }

    .contact-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .contact-image {
        width: 100px;
        height: 100px;
    }

    footer {
        padding: 15px;
        font-size: 0.75rem;
    }

    #footer-social-links {
        gap: 20px;
    }

    #footer-social-links svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .main-nav {
        width: 85vw;
    }

    .section-heading::after {
        display: none;
    }

    #hero h1 {
        font-size: 24px;
    }

    #hero .subtitle {
        font-size: 16px;
    }

    .hero-image-container {
        max-width: 180px;
        max-height: 180px;
    }

    .project-card {
        padding: 1.25rem;
    }

    .contact-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
}
